Advertisement
Guest User

Untitled

a guest
May 26th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 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-menu/core-submenu.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: 0px;
  27. right: 0px;
  28. bottom: 0px;
  29. left: 0px;
  30. width: 100%;
  31. height: 100%;
  32. background-color: rgb(255, 255, 255);
  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. #google_map {
  45. width: 100%;
  46. height: 100%;
  47. display: block;
  48. left: 0px;
  49. top: 0px;
  50. position: absolute;
  51. }
  52. #core_field {
  53. left: 18px;
  54. top: 10px;
  55. position: absolute;
  56. }
  57. #input {
  58. padding: 10px;
  59. position: relative;
  60. background-color: rgb(255, 255, 255);
  61. }
  62. #google_map_search {
  63. left: 760px;
  64. top: 390px;
  65. position: absolute;
  66. }
  67. </style>
  68. <core-scaffold id="core_scaffold">
  69. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  70. <core-toolbar id="core_toolbar">
  71. <core-field id="core_field" icon="search" theme="core-light-theme" center horizontal layout>
  72. </core-field>
  73. <input id="map_search" placeholder="type something..." is="core-input">
  74. </core-toolbar>
  75. <core-menu selected="Satellite" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
  76. <core-item id="roadmap" on-tap="{{ showRoad }}" icon="settings" label="Roadmap" horizontal center layout></core-item>
  77. <core-item id="satellite" on-tap="{{ showSatellite }}" icon="settings" label="Satellite" horizontal center layout active></core-item>
  78. </core-menu>
  79. </core-header-panel>
  80. <div id="div" tool>Title</div>
  81. <google-map latitude="37.601593169029705" longitude="-122.02803206054688" zoom="18" id="google_map"></google-map>
  82. <google-map-search map="{{ $.google_map.map }}" query="{{ $.map_search.value }}" id="google_map_search"></google-map-search>
  83. </core-scaffold>
  84. </template>
  85.  
  86. <script>
  87.  
  88. Polymer({
  89. showRoad: function () {
  90. this.$.google_map.mapType = 'roadmap';
  91. },
  92. showSatellite: function () {
  93. this.$.google_map.mapType = 'satellite';
  94. }
  95. });
  96.  
  97. </script>
  98.  
  99. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement