Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 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-menu/core-submenu.html">
  8. <link rel="import" href="../google-map/google-map.html">
  9.  
  10. <polymer-element name="my-element">
  11.  
  12. <template>
  13. <style>
  14. :host {
  15. position: absolute;
  16. width: 100%;
  17. height: 100%;
  18. box-sizing: border-box;
  19. }
  20. #core_scaffold {
  21. position: absolute;
  22. top: 0px;
  23. right: 0px;
  24. bottom: 0px;
  25. left: 0px;
  26. width: 100%;
  27. height: 100%;
  28. }
  29. #core_header_panel {
  30. background-color: rgb(255, 255, 255);
  31. }
  32. #core_toolbar {
  33. background-color: rgb(79, 125, 201);
  34. color: rgb(255, 255, 255);
  35. }
  36. #core_menu {
  37. font-size: 16px;
  38. }
  39. #google_map {
  40. width: 100%;
  41. height: 100%;
  42. display: block;
  43. left: 0px;
  44. top: 0px;
  45. position: absolute;
  46. }
  47. </style>
  48. <core-scaffold id="core_scaffold">
  49. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  50. <core-toolbar id="core_toolbar"></core-toolbar>
  51. <core-menu selected="Roadmap" valueattr="label" selectedindex="0" id="core_menu" theme="core-light-theme">
  52. <core-item id="core_item" on-tap="{{ showRoad }}" icon="settings" label="Roadmap" horizontal center layout active></core-item>
  53. <core-item id="core_item1" ont-tap='function () {
  54. this.$.google_map.mapType="satellite";
  55. } ' icon="settings" label="Satellite" horizontal center layout></core-item>
  56. </core-menu>
  57. </core-header-panel>
  58. <div id="div" tool>Title</div>
  59. <google-map id="google_map"></google-map>
  60. </core-scaffold>
  61. </template>
  62.  
  63. <script>
  64.  
  65. Polymer({
  66. showRoad: function () {
  67. this.$.google_map.mapType="roadmap";
  68. },
  69. showSat: function () {
  70. this.$.google_map.mapType="satellite";
  71. }
  72. });
  73.  
  74. </script>
  75.  
  76. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement