|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <!--
|
3 | 3 | Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
4 |
| -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE |
5 |
| -The complete set of authors may be found at http://polymer.github.io/AUTHORS |
6 |
| -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS |
| 4 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt |
| 5 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt |
7 | 7 | Code distributed by Google as part of the polymer project is also
|
8 |
| -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS |
| 8 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt |
9 | 9 | -->
|
10 | 10 | <html>
|
11 | 11 | <head>
|
12 | 12 | <title>Google Map</title>
|
13 | 13 | <script src="../platform/platform.js"></script>
|
14 | 14 | <link rel="import" href="google-map.html">
|
15 | 15 | <link rel="import" href="google-map-directions.html">
|
| 16 | + <style> |
| 17 | + body, html { |
| 18 | + height: 100%; |
| 19 | + margin: 0; |
| 20 | + } |
| 21 | + google-map { |
| 22 | + display: block; |
| 23 | + height: 100%; |
| 24 | + } |
| 25 | + </style> |
16 | 26 | </head>
|
17 | 27 | <body>
|
18 |
| - <polymer-element name="x-map-example" noscript> |
19 |
| - <template> |
20 |
| - <style> |
21 |
| - google-map { |
22 |
| - display: block; |
23 |
| - height: 600px; |
24 |
| - } |
25 |
| - </style> |
26 |
| - |
27 |
| - <google-map map="{{map}}"></google-map> |
28 |
| - <google-map-directions map="{{map}}" startAddress="San Francisco" endAddress="Mountain View"></google-map-directions> |
29 |
| - |
30 |
| - </template> |
31 |
| - </polymer-element> |
32 | 28 |
|
33 |
| - <x-map-example></x-map-example> |
| 29 | + <google-map disableDefaultUI></google-map> |
| 30 | + <google-map-directions startAddress="San Francisco" endAddress="Mountain View"></google-map-directions> |
| 31 | + |
| 32 | + <script> |
| 33 | + document.addEventListener('polymer-ready', function(e) { |
| 34 | + var dir = document.querySelector('google-map-directions'); |
| 35 | + var gmap = document.querySelector('google-map'); |
| 36 | + dir.map = gmap.map; |
| 37 | + }); |
| 38 | + </script> |
34 | 39 | </body>
|
35 | 40 | </html>
|
0 commit comments