Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 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-field/core-field.html">
  8. <link rel="import" href="../core-icon/core-icon.html">
  9. <link rel="import" href="../core-input/core-input.html">
  10. <link rel="import" href="../core-icons/core-icons.html">
  11. <link rel="import" href="../core-menu/core-submenu.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. color: rgb(255, 255, 255);
  39. background-color: rgb(79, 125, 201);
  40. }
  41. #core_menu {
  42. font-size: 16px;
  43. }
  44. #core_field {
  45. left: 18px;
  46. top: 10px;
  47. position: absolute;
  48. width: 210px;
  49. height: 40px;
  50. background-color: rgb(255, 255, 255);
  51. }
  52. #google_map {
  53. width: 100%;
  54. height: 100%;
  55. display: block;
  56. left: 0px;
  57. top: 0px;
  58. position: absolute;
  59. }
  60. #google_map_search {
  61. left: 700px;
  62. top: 450px;
  63. position: absolute;
  64. }
  65. </style>
  66. <core-scaffold id="core_scaffold">
  67. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  68. <core-toolbar id="core_toolbar">
  69. <core-field id="core_field" icon="search" theme="core-light-theme" center horizontal layout>
  70. <core-icon icon="search" id="core_icon"></core-icon>
  71. <input id="search_input" placeholder="search here..." is="core-input" flex>
  72. </core-field>
  73. </core-toolbar>
  74. <core-menu selected="Satellite" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
  75. <core-item id="core_item" on-tap="{{ showRoadmap }}" icon="settings" label="Roadmap" horizontal center layout active></core-item>
  76. <core-item id="core_item1" on-tap="{{ showSat }}" icon="settings" label="Satellite" horizontal center layout active></core-item>
  77. </core-menu>
  78. </core-header-panel>
  79. <div id="div" tool>My Google Map</div>
  80. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="18" id="google_map"></google-map>
  81. <google-map-search map="{{ $.google_map.map }}" query="{{ $.search_input.value }}" id="google_map_search"></google-map-search>
  82. </core-scaffold>
  83. </template>
  84.  
  85. <script>
  86.  
  87. Polymer({
  88. showRoadmap: function () {
  89. this.$.google_map.mapType = 'roadmap';
  90. },
  91. showSat: function () {
  92. this.$.google_map.mapType = 'satellite';
  93. }
  94. });
  95.  
  96. </script>
  97.  
  98. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement