Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. <link rel="import" href="../core-scaffold/core-scaffold.html">
  2. <link rel="import" href="../core-header-panel/core-header-panel.html">
  3. <link rel="import" href="../core-menu/core-menu.html">
  4. <link rel="import" href="../core-item/core-item.html">
  5. <link rel="import" href="../core-icon-button/core-icon-button.html">
  6. <link rel="import" href="../core-toolbar/core-toolbar.html">
  7. <link rel="import" href="../paper-input/paper-input.html">
  8. <link rel="import" href="../speech-mic/speech-mic.html">
  9. <link rel="import" href="../core-menu/core-submenu.html">
  10. <link rel="import" href="../paper-progress/paper-progress.html">
  11. <link rel="import" href="../google-map/google-map.html">
  12. <link rel="import" href="../google-map/google-map-search.html">
  13.  
  14. <polymer-element name="my-element">
  15.  
  16. <template>
  17. <style>
  18. :host {
  19. position: absolute;
  20. width: 100%;
  21. height: 100%;
  22. box-sizing: border-box;
  23. }
  24. #core_scaffold {
  25. position: absolute;
  26. top: -20px;
  27. right: 0px;
  28. bottom: 0px;
  29. left: 0px;
  30. width: 100%;
  31. height: 100%;
  32. }
  33. #core_header_panel {
  34. background-color: rgb(255, 255, 255);
  35. }
  36. #core_toolbar {
  37. color: rgb(255, 255, 255);
  38. background-color: rgb(79, 125, 201);
  39. }
  40. #core_menu {
  41. font-size: 16px;
  42. }
  43. #google_map {
  44. width: 100%;
  45. height: 100%;
  46. display: block;
  47. left: 0px;
  48. top: 0px;
  49. position: absolute;
  50. }
  51. #paper_input {
  52. left: 0px;
  53. top: 0px;
  54. position: absolute;
  55. width: 100%;
  56. height: 100%;
  57. }
  58. #google_map_search {
  59. left: 530px;
  60. top: 590px;
  61. position: absolute;
  62. }
  63. #speech_mic {
  64. left: 218px;
  65. top: 20px;
  66. position: absolute;
  67. }
  68. #paper_progress {
  69. left: 20px;
  70. top: 200px;
  71. position: absolute;
  72. }
  73. </style>
  74. <core-scaffold id="core_scaffold">
  75. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  76. <core-toolbar id="core_toolbar">
  77. <paper-input label="City" value="{{ $.speech_mic.transcript }}" id="paper_input"></paper-input>
  78. <speech-mic id="speech_mic"></speech-mic>
  79. </core-toolbar>
  80. <core-menu selected="RoadMap" valueattr="label" selectedindex="0" id="core_menu" theme="core-light-theme">
  81. <core-item id="core_item" icon="settings" label="RoadMap" on-tap="{{ ShowRoad }}" horizontal center layout active></core-item>
  82. <core-item id="core_item1" icon="settings" label="Satelitte" on-tap="{{ ShowSat }}" horizontal center layout></core-item>
  83. </core-menu>
  84. <paper-progress id="paper_progress"></paper-progress>
  85. </core-header-panel>
  86. <div id="div" tool>Title</div>
  87. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="18" id="google_map"></google-map>
  88. <google-map-search map="{{ $.google_map.map }}" query="{{ $.paper_input.value }}" id="google_map_search"></google-map-search>
  89. </core-scaffold>
  90. </template>
  91.  
  92. <script>
  93.  
  94. Polymer({
  95. ShowRoad: function (){
  96. this.$.google_map.mapType="roadmap";
  97. },
  98. ShowSat: function (){
  99. this.$.google_map.mapType="satellite";
  100. }
  101. });
  102.  
  103. </script>
  104.  
  105. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement