Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 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="../core-menu/core-submenu.html">
  9. <link rel="import" href="../google-map/google-map.html">
  10. <link rel="import" href="../google-map/google-map-search.html">
  11.  
  12. <polymer-element name="my-element">
  13.  
  14. <template>
  15. <style>
  16. :host {
  17. position: absolute;
  18. width: 100%;
  19. height: 100%;
  20. box-sizing: border-box;
  21. }
  22. #core_scaffold {
  23. position: absolute;
  24. top: 0px;
  25. right: 0px;
  26. bottom: 0px;
  27. left: 0px;
  28. width: 100%;
  29. height: 100%;
  30. }
  31. #core_header_panel {
  32. background-color: rgb(255, 255, 255);
  33. }
  34. #core_toolbar {
  35. color: rgb(255, 255, 255);
  36. background-color: rgb(79, 125, 201);
  37. }
  38. #core_menu {
  39. font-size: 16px;
  40. }
  41. #google_map {
  42. width: 690px;
  43. height: 490px;
  44. display: block;
  45. left: 0px;
  46. top: 0px;
  47. position: absolute;
  48. }
  49. #input {
  50. padding: 15px;
  51. left: 0px;
  52. top: 10px;
  53. position: absolute;
  54. width: 220px;
  55. height: 20px;
  56. background-color: rgb(255, 255, 255);
  57. }
  58. #google_map_search {
  59. left: 570px;
  60. top: 610px;
  61. position: absolute;
  62. }
  63. </style>
  64. <core-scaffold id="core_scaffold">
  65. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  66. <core-toolbar id="core_toolbar">
  67. <input id="input" placeholder="type something..." is="core-input">
  68. </core-toolbar>
  69. <core-menu selected="Satellite" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
  70. <core-item id="core_item" on-tap="{{ showRoad }}" icon="settings" label="Roadmap" horizontal center layout></core-item>
  71. <core-item id="core_item1" on-tap="{{ showSat }}" icon="settings" label="Satellite" horizontal center layout active></core-item>
  72. </core-menu>
  73. </core-header-panel>
  74. <div id="div" tool>My First Page</div>
  75. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="20" id="google_map"></google-map>
  76. <google-map-search map="{{ $.google_map.map }}" query="{{ $.input.value }}" id="google_map_search"></google-map-search>
  77. </core-scaffold>
  78. </template>
  79.  
  80. <script>
  81.  
  82. Polymer({
  83. showRoad: function (){
  84. this.$.google_map.mapType='roadmap';
  85. },
  86. showSat: function (){
  87. this.$.google_map.mapType='satellite';
  88. }
  89. });
  90.  
  91. </script>
  92.  
  93. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement