|
7 | 7 | <!doctype html> |
8 | 8 | <html> |
9 | 9 | <head> |
10 | | - <title>Click on the map to view place details</title> |
| 10 | + <title>Place Details with Google Maps</title> |
11 | 11 | <meta charset="utf-8" /> |
12 | | - <link rel="stylesheet" href="style.css" /> |
13 | | - <script type="module" src="./index.js"></script> |
| 12 | + <link rel="stylesheet" type="text/css" href="style.css" /> |
| 13 | + <script type="module" src="./index.js" defer></script> |
| 14 | + <!-- prettier-ignore --> |
| 15 | + <script> |
| 16 | + (g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))}) |
| 17 | + ({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"}); |
| 18 | + </script> |
14 | 19 | </head> |
15 | 20 | <body> |
16 | 21 | <!--[START maps_ui_kit_place_details_map] --> |
17 | | - <gmp-map center="47.759737, -122.250632" zoom="16" map-id="DEMO_MAP_ID"> |
18 | | - <gmp-advanced-marker></gmp-advanced-marker> |
19 | | - </gmp-map> |
20 | | - <!--[END maps_ui_kit_place_details_map] --> |
21 | | - <!--[START maps_ui_kit_place_details_container] --> |
22 | | - <div class="widget-container" slot="control-inline-start-block-start"> |
23 | | - <gmp-place-details> |
24 | | - <gmp-place-details-place-request |
25 | | - place="ChIJC8HakaIRkFQRiOgkgdHmqkk"></gmp-place-details-place-request> |
26 | | - <gmp-place-all-content></gmp-place-all-content> |
27 | | - </gmp-place-details> |
| 22 | + <div class="container"> |
| 23 | + <!-- map-id is required to use advanced markers. See https://developers.google.com/maps/documentation/javascript/map-ids/mapid-over. --> |
| 24 | + <gmp-map zoom="17" map-id="DEMO_MAP_ID"> |
| 25 | + <gmp-advanced-marker></gmp-advanced-marker> |
| 26 | + </gmp-map> |
| 27 | + <div class="ui-panel"> |
| 28 | + <gmp-place-details> |
| 29 | + <gmp-place-details-place-request |
| 30 | + place="ChIJC8HakaIRkFQRiOgkgdHmqkk"></gmp-place-details-place-request> |
| 31 | + <gmp-place-content-config> |
| 32 | + <gmp-place-address></gmp-place-address> |
| 33 | + <gmp-place-rating></gmp-place-rating> |
| 34 | + <gmp-place-type></gmp-place-type> |
| 35 | + <gmp-place-price></gmp-place-price> |
| 36 | + <gmp-place-accessible-entrance-icon></gmp-place-accessible-entrance-icon> |
| 37 | + <gmp-place-opening-hours></gmp-place-opening-hours> |
| 38 | + <gmp-place-website></gmp-place-website> |
| 39 | + <gmp-place-phone-number></gmp-place-phone-number> |
| 40 | + <gmp-place-summary></gmp-place-summary> |
| 41 | + <gmp-place-type-specific-highlights></gmp-place-type-specific-highlights> |
| 42 | + <gmp-place-review-summary></gmp-place-review-summary> |
| 43 | + <gmp-place-reviews></gmp-place-reviews> |
| 44 | + <gmp-place-feature-list></gmp-place-feature-list> |
| 45 | + </gmp-place-content-config> |
| 46 | + </gmp-place-details> |
| 47 | + </div> |
28 | 48 | </div> |
29 | | - <!--[END maps_ui_kit_place_details_container] --> |
30 | | - <script> |
31 | | - ((g) => { |
32 | | - var h, |
33 | | - a, |
34 | | - k, |
35 | | - p = 'The Google Maps JavaScript API', |
36 | | - c = 'google', |
37 | | - l = 'importLibrary', |
38 | | - q = '__ib__', |
39 | | - m = document, |
40 | | - b = window; |
41 | | - b = b[c] || (b[c] = {}); |
42 | | - var d = b.maps || (b.maps = {}), |
43 | | - r = new Set(), |
44 | | - e = new URLSearchParams(), |
45 | | - u = () => |
46 | | - h || |
47 | | - (h = new Promise(async (f, n) => { |
48 | | - await (a = m.createElement('script')); |
49 | | - e.set('libraries', [...r] + ''); |
50 | | - for (k in g) |
51 | | - e.set( |
52 | | - k.replace( |
53 | | - /[A-Z]/g, |
54 | | - (t) => '_' + t[0].toLowerCase() |
55 | | - ), |
56 | | - g[k] |
57 | | - ); |
58 | | - e.set('callback', c + '.maps.' + q); |
59 | | - a.src = |
60 | | - `https://maps.${c}apis.com/maps/api/js?` + e; |
61 | | - d[q] = f; |
62 | | - a.onerror = () => |
63 | | - (h = n(Error(p + ' could not load.'))); |
64 | | - a.nonce = |
65 | | - m.querySelector('script[nonce]')?.nonce || ''; |
66 | | - m.head.append(a); |
67 | | - })); |
68 | | - d[l] |
69 | | - ? console.warn(p + ' only loads once. Ignoring:', g) |
70 | | - : (d[l] = (f, ...n) => |
71 | | - r.add(f) && u().then(() => d[l](f, ...n))); |
72 | | - })({ key: 'AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8', v: 'weekly' }); |
73 | | - </script> |
| 49 | + <!--[END maps_ui_kit_place_details_map] --> |
74 | 50 | </body> |
75 | 51 | </html> |
76 | 52 | <!--[END maps_ui_kit_place_details] --> |
0 commit comments