Advertisement
Guest User

Untitled

a guest
May 4th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 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="../core-input/core-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="../cool-clock/cool-clock.html">
  11. <link rel="import" href="../notification-elements/notification-alert.html">
  12. <link rel="import" href="../google-map/google-map.html">
  13. <link rel="import" href="../google-map/google-map-search.html">
  14.  
  15. <polymer-element name="my-element">
  16.  
  17. <template>
  18. <style>
  19. :host {
  20. position: absolute;
  21. width: 100%;
  22. height: 100%;
  23. box-sizing: border-box;
  24. }
  25. #core_scaffold {
  26. position: absolute;
  27. top: 0px;
  28. right: 0px;
  29. bottom: 0px;
  30. left: 0px;
  31. width: 100%;
  32. height: 100%;
  33. }
  34. #core_header_panel {
  35. background-color: rgb(255, 255, 255);
  36. }
  37. #core_toolbar {
  38. background-color: rgb(79, 125, 201);
  39. color: rgb(255, 255, 255);
  40. }
  41. #core_menu {
  42. font-size: 16px;
  43. }
  44. #google_map {
  45. width: 100%;
  46. height: 100%;
  47. display: block;
  48. left: 0px;
  49. top: 0px;
  50. position: absolute;
  51. }
  52. #search_input {
  53. padding: 15px;
  54. left: 3%;
  55. top: 12%;
  56. position: absolute;
  57. width: 80%;
  58. background-color: rgb(255, 255, 255);
  59. }
  60. #google_map_search {
  61. left: 510px;
  62. top: 270px;
  63. position: absolute;
  64. }
  65. #speech_mic {
  66. display: block;
  67. left: 0px;
  68. top: 0px;
  69. position: absolute;
  70. }
  71. #cool_clock {
  72. width: 400px;
  73. height: 300px;
  74. left: 80px;
  75. top: 310px;
  76. position: absolute;
  77. }
  78. #notification_alert {
  79. left: 130px;
  80. top: 280px;
  81. position: absolute;
  82. }
  83. </style>
  84. <core-scaffold id="core_scaffold">
  85. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  86. <core-toolbar id="core_toolbar">
  87. <input id="search_input" placeholder="Search for a place..." is="core-input">
  88. <speech-mic id="speech_mic"></speech-mic>
  89. </core-toolbar>
  90. <core-menu valueattr="label" id="core_menu" theme="core-light-theme">
  91. <core-item id="core_item" icon="maps:map" on-tap="{{ roadmapView }}" label="Road Map" horizontal center layout></core-item>
  92. <core-item id="core_item1" icon="maps:layers" on-tap="{{ hybridView }}" label="Hybrid" horizontal center layout></core-item>
  93. <core-item id="core_item2" icon="maps:terrain" on-tap="{{ terrainView }}" label="Terrain" horizontal center layout></core-item>
  94. </core-menu>
  95. <cool-clock id="cool_clock"></cool-clock>
  96. <notification-alert message="Hi there!" icon="icon.png" name="notification" id="notification_alert"></notification-alert>
  97. </core-header-panel>
  98. <div id="div" tool>Map - Test</div>
  99. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="17" id="google_map"></google-map>
  100. <google-map-search query="{{ $.search_input.value }}" map="{{ $.google_map.map }}" id="google_map_search"></google-map-search>
  101. </core-scaffold>
  102. </template>
  103.  
  104. <script>
  105.  
  106. Polymer({
  107. roadmapView: function () {
  108. this.$.google_map.mapType = "roadmap";
  109. },
  110. hybridView: function () {
  111. this.$.google_map.mapType = "hybrid";
  112. },
  113. terrainView: function () {
  114. this.$.google_map.mapType = "terrain";
  115. }
  116. });
  117.  
  118. </script>
  119.  
  120. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement