Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 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="../paper-input/paper-input.html">
  8. <link rel="import" href="../speech-mic/speech-mic.html">
  9. <link rel="import" href="../core-menu/core-submenu.html">
  10. <link rel="import" href="../google-map/google-map.html">
  11. <link rel="import" href="../google-map/google-map-search.html">
  12.  
  13. <polymer-element name="my-element">
  14.  
  15. <template>
  16. <style>
  17. :host {
  18. position: absolute;
  19. width: 100%;
  20. height: 100%;
  21. box-sizing: border-box;
  22. }
  23. #core_card {
  24. position: absolute;
  25. width: 300px;
  26. height: auto;
  27. border-radius: 2px;
  28. box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
  29. left: 290px;
  30. top: 150px;
  31. background-color: rgb(255, 255, 255);
  32. }
  33. #core_scaffold {
  34. position: absolute;
  35. top: 0px;
  36. right: 0px;
  37. bottom: 0px;
  38. left: 0px;
  39. width: 100%;
  40. height: 100%;
  41. }
  42. #core_header_panel {
  43. background-color: rgb(255, 255, 255);
  44. }
  45. #core_toolbar {
  46. color: rgb(255, 255, 255);
  47. background-color: rgb(79, 125, 201);
  48. }
  49. #core_menu {
  50. font-size: 16px;
  51. }
  52. #google_map {
  53. width: 100%;
  54. height: 100%;
  55. display: block;
  56. left: 0px;
  57. top: 0px;
  58. position: absolute;
  59. }
  60. #google_map_search {
  61. left: 360px;
  62. top: 260px;
  63. position: absolute;
  64. }
  65. #paper_input {
  66. background-color: rgb(255, 85, 85);
  67. }
  68. #speech_mic {
  69. left: 198px;
  70. top: 10px;
  71. position: absolute;
  72. }
  73. </style>
  74. <core-card id="core_card" layout vertical>
  75. </core-card>
  76. <core-scaffold id="core_scaffold">
  77. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  78. <core-toolbar id="core_toolbar">
  79. <paper-input label="Search..." value="{{ $.speech_mic.transcript }}" id="paper_input" one flex></paper-input>
  80. <speech-mic id="speech_mic"></speech-mic>
  81. </core-toolbar>
  82. <core-menu selected="Satellie" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
  83. <core-item id="core_item1" on-tap="{{ showRoad }}" label="RoadMap" icon="settings" horizontal center layout></core-item>
  84. <core-item id="core_item1" on-tap="{{ showSat }}" label="Satellie" icon="settings" horizontal center layout active></core-item>
  85. </core-menu>
  86. </core-header-panel>
  87. <div id="div" tool>Title</div>
  88. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="18" id="google_map"></google-map>
  89. <google-map-search map="{{ $.google_map.map }}" query="{{ $.paper_input.value }}" id="google_map_search"></google-map-search>
  90. </core-scaffold>
  91. </template>
  92.  
  93. <script>
  94.  
  95. Polymer({
  96. showRoad: function (){
  97. this.$.google_map.mapType = 'roadmap';
  98. //$('#google_map').mapType = 'satellite';
  99. },
  100. showSat: function (){
  101. this.$.google_map.mapType = 'satellite';
  102. //$('#google_map').mapType = 'satellite';
  103. }
  104. });
  105.  
  106. </script>
  107.  
  108. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement