Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <link rel="import" href="../core-ajax/core-ajax.html">
  2. <link rel="import" href="../core-scaffold/core-scaffold.html">
  3. <link rel="import" href="../core-header-panel/core-header-panel.html">
  4. <link rel="import" href="../core-menu/core-menu.html">
  5. <link rel="import" href="../core-item/core-item.html">
  6. <link rel="import" href="../core-icon-button/core-icon-button.html">
  7. <link rel="import" href="../core-toolbar/core-toolbar.html">
  8. <link rel="import" href="../core-menu/core-submenu.html">
  9. <link rel="import" href="../google-map/google-map.html">
  10.  
  11. <polymer-element name="my-element">
  12.  
  13. <template>
  14. <style>
  15. #core_ajax {
  16. left: 530px;
  17. top: 330px;
  18. position: absolute;
  19. }
  20. #core_scaffold {
  21. position: absolute;
  22. top: 0px;
  23. right: 0px;
  24. bottom: 0px;
  25. left: 0px;
  26. }
  27. #core_header_panel {
  28. background-color: rgb(255, 255, 255);
  29. }
  30. #core_toolbar {
  31. background-color: rgb(79, 125, 201);
  32. color: rgb(255, 255, 255);
  33. }
  34. #core_menu {
  35. font-size: 16px;
  36. }
  37. #google_map {
  38. width: 100%;
  39. height: 100%;
  40. display: block;
  41. left: 0px;
  42. top: 0px;
  43. position: absolute;
  44. }
  45. </style>
  46. <core-ajax handleas="json" method="GET" id="core_ajax" hidden></core-ajax>
  47. <core-scaffold id="core_scaffold">
  48. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  49. <core-toolbar id="core_toolbar"></core-toolbar>
  50. <core-menu selected="roadmap" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
  51. <core-item id="roadmap" on-tap="{{ showRoad }}" icon="settings" label="Item1" horizontal center layout>road</core-item>
  52. <core-item id="satellite" on-tap="{{ sohwSat }}" icon="settings" label="Item2" horizontal center layout active>sat</core-item>
  53. </core-menu>
  54. </core-header-panel>
  55. <div id="div" tool>Title</div>
  56. <google-map latitude="37.55914825246029" longitude="-122.05343794433594" id="google_map"></google-map>
  57. </core-scaffold>
  58. </template>
  59.  
  60. <script>
  61.  
  62. Polymer({
  63. showRoad: function () {
  64. this.$.google_map.mapType = 'roadmap';
  65. },
  66. sohwSat: function () {
  67. this.$.google_map.mapType = 'satellite';
  68. }
  69. });
  70.  
  71. </script>
  72.  
  73. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement