Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 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-search.html">
  11. <link rel="import" href="../google-map/google-map.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_scaffold {
  24. position: absolute;
  25. top: 0px;
  26. right: 0px;
  27. bottom: 0px;
  28. left: -10px;
  29. }
  30. #core_header_panel {
  31. background-color: rgb(255, 255, 255);
  32. }
  33. #core_toolbar {
  34. color: rgb(255, 255, 255);
  35. background-color: rgb(79, 125, 201);
  36. }
  37. #core_menu {
  38. font-size: 16px;
  39. }
  40. #google_map {
  41. width: 100%;
  42. height: 100%;
  43. display: block;
  44. left: 0px;
  45. top: 0px;
  46. position: absolute;
  47. }
  48. #paper_input {
  49. left: 18px;
  50. top: -10px;
  51. position: absolute;
  52. color: rgb(255, 255, 255);
  53. }
  54. #google_map_search {
  55. left: 70px;
  56. top: 350px;
  57. position: absolute;
  58. }
  59. #speech_mic {
  60. left: 188px;
  61. top: 10px;
  62. position: absolute;
  63. }
  64. </style>
  65. <core-scaffold id="core_scaffold">
  66. <core-header-panel mode="seamed" id="core_header_panel" navigation flex>
  67. <core-toolbar id="core_toolbar">
  68. <paper-input label="Search for place" floatinglabel value="{{ $.speech_mic.transcript }}" id="paper_input"></paper-input>
  69. <speech-mic id="speech_mic"></speech-mic>
  70. </core-toolbar>
  71. <core-menu selected="Satellite" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
  72. <core-item id="core_item" icon="settings" label="Road" horizontal center layout on-tap="{{ setRoadMap }}"></core-item>
  73. <core-item id="core_item1" icon="settings" label="Satellite" horizontal center layout on-tap="{{ setSatellite }}" active></core-item>
  74. </core-menu>
  75. <google-map-search map="{{ $.google_map.map }}" query="{{ $.paper_input.value }}" id="google_map_search"></google-map-search>
  76. </core-header-panel>
  77. <div id="div" tool>Title</div>
  78. <google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="14" id="google_map"></google-map>
  79. </core-scaffold>
  80. </template>
  81.  
  82. <script>
  83.  
  84. Polymer({
  85. setRoadMap: function (){
  86. this.$.google_map.mapType = "roadmap";
  87. },
  88. setSatellite: function (){
  89. this.$.google_map.mapType = "satellite";
  90. }
  91. });
  92.  
  93. </script>
  94.  
  95. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement