Guest User

Untitled

a guest
Mar 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 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. #design_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. #google_map_search {
  53. left: 940px;
  54. top: 390px;
  55. position: absolute;
  56. }
  57. #core_field {
  58. left: 0px;
  59. top: 0px;
  60. position: absolute;
  61. width: 100%;
  62. height: 100%;
  63. background-color: rgb(255, 255, 255);
  64. }
  65. #input {
  66. left: 0px;
  67. top: 0px;
  68. position: relative;
  69. width: auto;
  70. height: auto;
  71. background-color: rgb(255, 255, 255);
  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. <core-field id="core_field" icon="search" theme="core-light-theme" center horizontal layout>
  78. <core-icon icon="search" id="core_icon"></core-icon>
  79. <core-input id="core_input" flex>
  80. <input committedvalue="eiffel tower" id="input" value="eiffel tower" placeholder="type something..." is="core-input">
  81. </core-input>
  82. </core-field>
  83. </core-toolbar>
  84. <core-menu selected="Item1" valueattr="label" selectedindex="0" id="core_menu" theme="core-light-theme">
  85. <core-item id="core_item" on-tap="{{ roadMap }}" icon="settings" horizontal center layout active>Roadmap</core-item>
  86. <core-item id="core_item1" on-tap="{{ satelliteMap }}" icon="settings" horizontal center layout>Satellite</core-item>
  87. </core-menu>
  88. </core-header-panel>
  89. <div id="div" tool>Title</div>
  90. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="18" id="google_map"></google-map>
  91. <google-map-search map="{{ $.google_map.map }}" query="{{ $.input.value }}" id="google_map_search"></google-map-search>
  92. </core-scaffold>
  93. </template>
  94.  
  95. <script>
  96.  
  97. Polymer({
  98. roadMap: function () {
  99. this.$.google_map.mapType = "roadmap";
  100. },
  101. satelliteMap: function () {
  102. this.$.google_map.mapType = "satellite";
  103. }
  104. });
  105.  
  106. </script>
  107.  
  108. </polymer-element>
Add Comment
Please, Sign In to add comment