diff --git a/dist/samples/3d-accessibility-features/app/index.ts b/dist/samples/3d-accessibility-features/app/index.ts index 457b84c44..8069b74f8 100644 --- a/dist/samples/3d-accessibility-features/app/index.ts +++ b/dist/samples/3d-accessibility-features/app/index.ts @@ -6,9 +6,13 @@ // [START maps_3d_accessibility_features] async function initMap() { - const { Map3DElement, Marker3DInteractiveElement, PopoverElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [ + { Map3DElement, Marker3DInteractiveElement, PopoverElement }, + { PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 34.8405, lng: -111.7909, altitude: 1322.7 }, diff --git a/dist/samples/3d-accessibility-features/dist/assets/index-CAWeQ9mC.js b/dist/samples/3d-accessibility-features/dist/assets/index-CAWeQ9mC.js new file mode 100644 index 000000000..5b948f420 --- /dev/null +++ b/dist/samples/3d-accessibility-features/dist/assets/index-CAWeQ9mC.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{Map3DElement:e,Marker3DInteractiveElement:t,PopoverElement:n},{PinElement:r}]=await Promise.all([google.maps.importLibrary(`maps3d`),google.maps.importLibrary(`marker`)]),i=new e({center:{lat:34.8405,lng:-111.7909,altitude:1322.7},range:13279.5,tilt:67.44,heading:.01,mode:`SATELLITE`,gestureHandling:`COOPERATIVE`});[{position:{lat:34.8791806,lng:-111.8265049},title:`Boynton Pass`},{position:{lat:34.8559195,lng:-111.7988186},title:`Airport Mesa`},{position:{lat:34.832149,lng:-111.7695277},title:`Chapel of the Holy Cross`},{position:{lat:34.823736,lng:-111.8001857},title:`Red Rock Crossing`},{position:{lat:34.800326,lng:-111.7665047},title:`Bell Rock`}].forEach(({position:e,title:a},o)=>{let s=new r({glyphText:`${o+1}`,scale:1.5,glyphColor:`#FFFFFF`}),c=new n,l=`${o+1}. ${a}`,u=document.createElement(`span`);u.ariaLabel=`This is marker ${o+1}. ${a}`,u.slot=`header`,c.append(u),c.append(l);let d=new t({title:a,position:e,gmpPopoverTargetElement:c});d.append(s),i.append(d),i.append(c)}),document.body.append(i)}e(); \ No newline at end of file diff --git a/dist/samples/3d-accessibility-features/dist/assets/index-y43h04GL.js b/dist/samples/3d-accessibility-features/dist/assets/index-y43h04GL.js deleted file mode 100644 index dfcc28110..000000000 --- a/dist/samples/3d-accessibility-features/dist/assets/index-y43h04GL.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{Map3DElement:e,Marker3DInteractiveElement:t,PopoverElement:n}=await google.maps.importLibrary(`maps3d`),{PinElement:r}=await google.maps.importLibrary(`marker`),i=new e({center:{lat:34.8405,lng:-111.7909,altitude:1322.7},range:13279.5,tilt:67.44,heading:.01,mode:`SATELLITE`,gestureHandling:`COOPERATIVE`});[{position:{lat:34.8791806,lng:-111.8265049},title:`Boynton Pass`},{position:{lat:34.8559195,lng:-111.7988186},title:`Airport Mesa`},{position:{lat:34.832149,lng:-111.7695277},title:`Chapel of the Holy Cross`},{position:{lat:34.823736,lng:-111.8001857},title:`Red Rock Crossing`},{position:{lat:34.800326,lng:-111.7665047},title:`Bell Rock`}].forEach(({position:e,title:a},o)=>{let s=new r({glyphText:`${o+1}`,scale:1.5,glyphColor:`#FFFFFF`}),c=new n,l=`${o+1}. ${a}`,u=document.createElement(`span`);u.ariaLabel=`This is marker ${o+1}. ${a}`,u.slot=`header`,c.append(u),c.append(l);let d=new t({title:a,position:e,gmpPopoverTargetElement:c});d.append(s),i.append(d),i.append(c)}),document.body.append(i)}e(); \ No newline at end of file diff --git a/dist/samples/3d-accessibility-features/dist/index.html b/dist/samples/3d-accessibility-features/dist/index.html index b48a7d158..2e63bcda5 100644 --- a/dist/samples/3d-accessibility-features/dist/index.html +++ b/dist/samples/3d-accessibility-features/dist/index.html @@ -9,7 +9,7 @@ Map - + diff --git a/dist/samples/3d-accessibility-features/docs/index.js b/dist/samples/3d-accessibility-features/docs/index.js index 37e1d2f1c..35fe98f11 100644 --- a/dist/samples/3d-accessibility-features/docs/index.js +++ b/dist/samples/3d-accessibility-features/docs/index.js @@ -7,9 +7,13 @@ // [START maps_3d_accessibility_features] async function initMap() { - const { Map3DElement, Marker3DInteractiveElement, PopoverElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [ + { Map3DElement, Marker3DInteractiveElement, PopoverElement }, + { PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 34.8405, lng: -111.7909, altitude: 1322.7 }, diff --git a/dist/samples/3d-accessibility-features/docs/index.ts b/dist/samples/3d-accessibility-features/docs/index.ts index 457b84c44..8069b74f8 100644 --- a/dist/samples/3d-accessibility-features/docs/index.ts +++ b/dist/samples/3d-accessibility-features/docs/index.ts @@ -6,9 +6,13 @@ // [START maps_3d_accessibility_features] async function initMap() { - const { Map3DElement, Marker3DInteractiveElement, PopoverElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [ + { Map3DElement, Marker3DInteractiveElement, PopoverElement }, + { PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 34.8405, lng: -111.7909, altitude: 1322.7 }, diff --git a/dist/samples/3d-accessibility-features/jsfiddle/demo.js b/dist/samples/3d-accessibility-features/jsfiddle/demo.js index cbdefe3ce..0b2f59793 100644 --- a/dist/samples/3d-accessibility-features/jsfiddle/demo.js +++ b/dist/samples/3d-accessibility-features/jsfiddle/demo.js @@ -6,9 +6,13 @@ */ async function initMap() { - const { Map3DElement, Marker3DInteractiveElement, PopoverElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [ + { Map3DElement, Marker3DInteractiveElement, PopoverElement }, + { PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 34.8405, lng: -111.7909, altitude: 1322.7 }, diff --git a/dist/samples/3d-coverage-map/app/index.ts b/dist/samples/3d-coverage-map/app/index.ts index d8b1adfc5..2eaf70047 100644 --- a/dist/samples/3d-coverage-map/app/index.ts +++ b/dist/samples/3d-coverage-map/app/index.ts @@ -18,8 +18,10 @@ const placeAutocomplete = document.querySelector('gmp-place-autocomplete')!; async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + ]); // Get the inner map from the map element. const innerMap = mapElement.innerMap; diff --git a/dist/samples/3d-coverage-map/dist/assets/index-C4Z3r0kD.js b/dist/samples/3d-coverage-map/dist/assets/index-Dhlabv1v.js similarity index 66% rename from dist/samples/3d-coverage-map/dist/assets/index-C4Z3r0kD.js rename to dist/samples/3d-coverage-map/dist/assets/index-Dhlabv1v.js index 4cca44b18..32fa8a5f5 100644 --- a/dist/samples/3d-coverage-map/dist/assets/index-C4Z3r0kD.js +++ b/dist/samples/3d-coverage-map/dist/assets/index-Dhlabv1v.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={strokeColor:`#2a76ff`,strokeWeight:2,strokeOpacity:1,fillColor:`#2a76ff`,fillOpacity:.3},t=document.querySelector(`gmp-map`),n=document.querySelector(`gmp-place-autocomplete`);async function r(){await google.maps.importLibrary(`maps`),await google.maps.importLibrary(`places`);let r=t.innerMap;r.setOptions({mapTypeControl:!1});let i=r.getDatasetFeatureLayer(`bcf6598c-7603-4698-9493-9e927d8d3d38`);i.style=e,n.includedPrimaryTypes=[`(regions)`],n.addEventListener(`gmp-select`,async({placePrediction:e})=>{if(!e)return;let t=e.toPlace();await t.fetchFields({fields:[`location`]}),t.location&&(r.setCenter(t.location),r.setZoom(9))})}r(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={strokeColor:`#2a76ff`,strokeWeight:2,strokeOpacity:1,fillColor:`#2a76ff`,fillOpacity:.3},t=document.querySelector(`gmp-map`),n=document.querySelector(`gmp-place-autocomplete`);async function r(){await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`places`)]);let r=t.innerMap;r.setOptions({mapTypeControl:!1});let i=r.getDatasetFeatureLayer(`bcf6598c-7603-4698-9493-9e927d8d3d38`);i.style=e,n.includedPrimaryTypes=[`(regions)`],n.addEventListener(`gmp-select`,async({placePrediction:e})=>{if(!e)return;let t=e.toPlace();await t.fetchFields({fields:[`location`]}),t.location&&(r.setCenter(t.location),r.setZoom(9))})}r(); \ No newline at end of file diff --git a/dist/samples/3d-coverage-map/dist/index.html b/dist/samples/3d-coverage-map/dist/index.html index b6d580e52..316f62631 100644 --- a/dist/samples/3d-coverage-map/dist/index.html +++ b/dist/samples/3d-coverage-map/dist/index.html @@ -9,7 +9,7 @@ Map - + diff --git a/dist/samples/3d-coverage-map/docs/index.js b/dist/samples/3d-coverage-map/docs/index.js index 0f8946420..86551eadc 100644 --- a/dist/samples/3d-coverage-map/docs/index.js +++ b/dist/samples/3d-coverage-map/docs/index.js @@ -19,8 +19,10 @@ const placeAutocomplete = document.querySelector('gmp-place-autocomplete'); async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + ]); // Get the inner map from the map element. const innerMap = mapElement.innerMap; diff --git a/dist/samples/3d-coverage-map/docs/index.ts b/dist/samples/3d-coverage-map/docs/index.ts index d8b1adfc5..2eaf70047 100644 --- a/dist/samples/3d-coverage-map/docs/index.ts +++ b/dist/samples/3d-coverage-map/docs/index.ts @@ -18,8 +18,10 @@ const placeAutocomplete = document.querySelector('gmp-place-autocomplete')!; async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + ]); // Get the inner map from the map element. const innerMap = mapElement.innerMap; diff --git a/dist/samples/3d-coverage-map/jsfiddle/demo.js b/dist/samples/3d-coverage-map/jsfiddle/demo.js index 2a743d0b3..2f4c0ec73 100644 --- a/dist/samples/3d-coverage-map/jsfiddle/demo.js +++ b/dist/samples/3d-coverage-map/jsfiddle/demo.js @@ -18,8 +18,10 @@ const placeAutocomplete = document.querySelector('gmp-place-autocomplete'); async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + ]); // Get the inner map from the map element. const innerMap = mapElement.innerMap; diff --git a/dist/samples/3d-marker-customization/app/index.ts b/dist/samples/3d-marker-customization/app/index.ts index 7fa635d10..e997244f1 100644 --- a/dist/samples/3d-marker-customization/app/index.ts +++ b/dist/samples/3d-marker-customization/app/index.ts @@ -6,9 +6,11 @@ // [START maps_3d_marker_customization] async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [{ Map3DElement, Marker3DElement }, { PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 37.4176, lng: -122.02, altitude: 0 }, diff --git a/dist/samples/3d-marker-customization/dist/assets/index-F8rmfRi2.js b/dist/samples/3d-marker-customization/dist/assets/index-F8rmfRi2.js new file mode 100644 index 000000000..f3be64aa8 --- /dev/null +++ b/dist/samples/3d-marker-customization/dist/assets/index-F8rmfRi2.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{Map3DElement:e,Marker3DElement:t},{PinElement:n}]=await Promise.all([google.maps.importLibrary(`maps3d`),google.maps.importLibrary(`marker`)]),r=new e({center:{lat:37.4176,lng:-122.02,altitude:0},tilt:67.5,range:7e3,mode:`HYBRID`,gestureHandling:`COOPERATIVE`});r.mode=`SATELLITE`;let i=new n({borderColor:`#FFFFFF`}),a=new t({position:{lat:37.415,lng:-122.035}});a.append(i);let o=new t({position:{lat:37.419,lng:-122.03},label:`Simple label`}),s=new n({scale:1.5}),c=new t({position:{lat:37.419,lng:-122.02}});c.append(s);let l=new n({glyphColor:`white`}),u=new t({position:{lat:37.415,lng:-122.025}});u.append(l);let d=new n({background:`#F0F6FC`,glyphText:`E`,glyphColor:`red`,borderColor:`#0000FF`}),f=new t({position:{lat:37.415,lng:-122.015,altitude:50},extruded:!0,altitudeMode:`RELATIVE_TO_GROUND`});f.append(d);let p=new n({glyphText:``}),m=new t({position:{lat:37.415,lng:-122.005}});m.append(p);let h=new n({background:`#FBBC04`}),g=new t({position:{lat:37.419,lng:-122.01}});g.append(h),r.append(o),r.append(c),r.append(g),r.append(a),r.append(u),r.append(f),r.append(m),document.body.append(r)}e(); \ No newline at end of file diff --git a/dist/samples/3d-marker-customization/dist/assets/index-u7E6mvyA.js b/dist/samples/3d-marker-customization/dist/assets/index-u7E6mvyA.js deleted file mode 100644 index 1ba6167dd..000000000 --- a/dist/samples/3d-marker-customization/dist/assets/index-u7E6mvyA.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{Map3DElement:e,Marker3DElement:t}=await google.maps.importLibrary(`maps3d`),{PinElement:n}=await google.maps.importLibrary(`marker`),r=new e({center:{lat:37.4176,lng:-122.02,altitude:0},tilt:67.5,range:7e3,mode:`HYBRID`,gestureHandling:`COOPERATIVE`});r.mode=`SATELLITE`;let i=new n({borderColor:`#FFFFFF`}),a=new t({position:{lat:37.415,lng:-122.035}});a.append(i);let o=new t({position:{lat:37.419,lng:-122.03},label:`Simple label`}),s=new n({scale:1.5}),c=new t({position:{lat:37.419,lng:-122.02}});c.append(s);let l=new n({glyphColor:`white`}),u=new t({position:{lat:37.415,lng:-122.025}});u.append(l);let d=new n({background:`#F0F6FC`,glyphText:`E`,glyphColor:`red`,borderColor:`#0000FF`}),f=new t({position:{lat:37.415,lng:-122.015,altitude:50},extruded:!0,altitudeMode:`RELATIVE_TO_GROUND`});f.append(d);let p=new n({glyphText:``}),m=new t({position:{lat:37.415,lng:-122.005}});m.append(p);let h=new n({background:`#FBBC04`}),g=new t({position:{lat:37.419,lng:-122.01}});g.append(h),r.append(o),r.append(c),r.append(g),r.append(a),r.append(u),r.append(f),r.append(m),document.body.append(r)}e(); \ No newline at end of file diff --git a/dist/samples/3d-marker-customization/dist/index.html b/dist/samples/3d-marker-customization/dist/index.html index 262e16457..83b4e9d01 100644 --- a/dist/samples/3d-marker-customization/dist/index.html +++ b/dist/samples/3d-marker-customization/dist/index.html @@ -9,7 +9,7 @@ Map - + diff --git a/dist/samples/3d-marker-customization/docs/index.js b/dist/samples/3d-marker-customization/docs/index.js index bd409f1c5..9f5e7b144 100644 --- a/dist/samples/3d-marker-customization/docs/index.js +++ b/dist/samples/3d-marker-customization/docs/index.js @@ -7,9 +7,11 @@ // [START maps_3d_marker_customization] async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [{ Map3DElement, Marker3DElement }, { PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 37.4176, lng: -122.02, altitude: 0 }, diff --git a/dist/samples/3d-marker-customization/docs/index.ts b/dist/samples/3d-marker-customization/docs/index.ts index 7fa635d10..e997244f1 100644 --- a/dist/samples/3d-marker-customization/docs/index.ts +++ b/dist/samples/3d-marker-customization/docs/index.ts @@ -6,9 +6,11 @@ // [START maps_3d_marker_customization] async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [{ Map3DElement, Marker3DElement }, { PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 37.4176, lng: -122.02, altitude: 0 }, diff --git a/dist/samples/3d-marker-customization/jsfiddle/demo.js b/dist/samples/3d-marker-customization/jsfiddle/demo.js index a138e12a0..7aa0b1123 100644 --- a/dist/samples/3d-marker-customization/jsfiddle/demo.js +++ b/dist/samples/3d-marker-customization/jsfiddle/demo.js @@ -6,9 +6,11 @@ */ async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); + const [{ Map3DElement, Marker3DElement }, { PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + ]); const map = new Map3DElement({ center: { lat: 37.4176, lng: -122.02, altitude: 0 }, diff --git a/dist/samples/3d-marker-graphics/app/index.ts b/dist/samples/3d-marker-graphics/app/index.ts index 961546351..94e07d54a 100644 --- a/dist/samples/3d-marker-graphics/app/index.ts +++ b/dist/samples/3d-marker-graphics/app/index.ts @@ -6,10 +6,12 @@ // [START maps_3d_marker_graphics] async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map3DElement, Marker3DElement }, { PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const map = new Map3DElement({ center: { lat: 37.426, lng: -122.082, altitude: 18 }, diff --git a/dist/samples/3d-marker-graphics/dist/assets/index-8BLcoNVb.js b/dist/samples/3d-marker-graphics/dist/assets/index-8BLcoNVb.js deleted file mode 100644 index 7d531495d..000000000 --- a/dist/samples/3d-marker-graphics/dist/assets/index-8BLcoNVb.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{Map3DElement:e,Marker3DElement:t}=await google.maps.importLibrary(`maps3d`),{PinElement:n}=await google.maps.importLibrary(`marker`),{Place:r}=await google.maps.importLibrary(`places`),i=new e({center:{lat:37.426,lng:-122.082,altitude:18},tilt:67.5,range:4e3,mode:`SATELLITE`,gestureHandling:`COOPERATIVE`}),a=document.createElement(`img`);a.src=String(new URL(`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAACcUlEQVR4AazUA6wsZwCA0TNYXte2bdu2bdu2bdtW1I1TK6jbZ1vX3r+aoH7YL9kdn/EkSFGHZjQgRYQYSfZLUUIjWrJfI8pI/KXdDz744CNbW1u/+PDDD+/FulgBS2OpI444Yo0vv/zy+MmTJz/R1dX1ccgaGBhonTBhwjuvvvrq0VgKTchFCFdffbVrTm0244tE3RaHtvfEuZ/iOK6madqYmzF+1eqY75k4RDJtpGpXu66pU3X++ouWW0/Dzkf5pju5Z/PNN38ck1IAg7NUh99q+APXNjRttP2GabGoOvYHubo6+V9/uXJZUlcHADo+r+iaMNaSFz6+CyrojQFggW2pW4Hu7z/T89OXZrf+/v4c5kdd7C8tcRxx0RwVQoiQQ/o3MCmx+ClzjiJC9DcQCoux8PFEc476RxDyizL/0USFGoGQW4SW04gXqhEIcZH6o0hWqxEIkN+ReLsaghCtkqG1AiFZleKuNQShsCYNO9cQhIZNqVuthiAsfDBJ6R/AIUOGjNW8D/ml/WPxsiS7E51FeiNN7zP/o5JFj7PwbiCgmv0EvHvVVVc9M3PmzOmh+9sQZj4RQuuzIfR8FcJgWxj2a88999xb559//h04AcfutNNO51cqlbfDwMzw6wf4U+yP1SDgDZyGE3beeefzLr/88ut/+x1//PGX4VgcjYOwIzbBBtgQW2IP7JXNXyxCwKt4D1PRhgEAQBW9aEcXBhEhj3rE6EBrCgjoxhRMQi8CAEKG9mdYFRFitCHCAAYiBLyMVzAE4zI8+HvhH+ZHyBwhBeBvdyuYvUL2A7EaN9fgL6OPgaMG/qemgX9huYBSgwHnr9+YKVsfRAAAAABJRU5ErkJggg==`,``+import.meta.url));let o=new t({position:{lat:37.434,lng:-122.082}}),s=document.createElement(`template`);s.content.append(a),o.append(s),i.append(o);let c=new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20enable-background='new%200%200%20192%20192'%20height='192'%20viewBox='0%200%20192%20192'%20width='192'%3e%3crect%20fill='none'%20height='192'%20width='192'/%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M113.89,84.4l25.27-19.25l11.22-24.21c-7.47-14.26-20.37-25.24-35.88-30.11L91.18,26.58L77.95,54.29l0,0%20c4.3-5.21,10.75-8.49,18-8.49c13.02,0,23.43,10.53,23.43,23.43C119.37,75,117.29,80.32,113.89,84.4z'%20fill='%234285F4'/%3e%3cpath%20d='M95.94,8c-18.9,0-35.65,8.49-46.97,21.96l10.78,17.66l18.2,6.68c0.11-0.11,36.56-43.46,36.56-43.46%20C108.62,9.02,102.39,8,95.94,8z'%20fill='%231A73E8'/%3e%3cpath%20d='M113.89,84.4c-4.3,5.09-10.7,8.38-17.95,8.38c-13.02,0-23.43-10.53-23.43-23.43%20c0-5.55,2.26-11.09,5.43-15.05L51.09,73.5L40.71,98.66c6.45,14.03,17.09,25.35,28.07,39.5l28.78-22.9L113.89,84.4z'%20fill='%23FBBC04'/%3e%3cpath%20d='M157.4,69.35c0-10.3-2.6-19.92-7.02-28.41l-81.61,97.22c3.62,4.64,7.13,9.62,10.64,15.05%20C91.87,172.46,88.13,184,96.06,184c8.04,0,4.53-11.54,16.98-30.79C133.52,121.18,157.4,106.58,157.4,69.35z'%20fill='%2334A853'/%3e%3cpath%20d='M77.95,54.29L48.97,29.96C40.03,40.6,34.6,54.41,34.6,69.35c0,11.54,2.26,20.94,6.11,29.31L77.95,54.29z'%20fill='%23EA4335'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg/%3e%3cg/%3e%3cg/%3e%3c/svg%3e`,``+import.meta.url),l=new n({background:`white`,glyphSrc:new URL(c)}),u=new t({position:{lat:37.425,lng:-122.07,altitude:100},extruded:!0,altitudeMode:`ABSOLUTE`});u.append(l);try{i.append(u)}catch(e){console.error(e)}let d=new r({id:`ChIJN5Nz71W3j4ARhx5bwpTQEGg`});await d.fetchFields({fields:[`location`,`displayName`,`svgIconMaskURI`,`iconBackgroundColor`]});let f=new n({background:d.iconBackgroundColor,glyphSrc:new URL(String(d.svgIconMaskURI))}),p=new t({position:d.location?.toJSON()});p.append(f),i.append(p);let m=new DOMParser().parseFromString(``,`image/svg+xml`).documentElement,h=new t({position:{lat:37.425,lng:-122.094}}),g=document.createElement(`template`);g.content.append(m),h.append(g),i.append(h),document.body.append(i)}e(); \ No newline at end of file diff --git a/dist/samples/3d-marker-graphics/dist/assets/index-CeyRHPiK.js b/dist/samples/3d-marker-graphics/dist/assets/index-CeyRHPiK.js new file mode 100644 index 000000000..3792ba4cd --- /dev/null +++ b/dist/samples/3d-marker-graphics/dist/assets/index-CeyRHPiK.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{Map3DElement:e,Marker3DElement:t},{PinElement:n},{Place:r}]=await Promise.all([google.maps.importLibrary(`maps3d`),google.maps.importLibrary(`marker`),google.maps.importLibrary(`places`)]),i=new e({center:{lat:37.426,lng:-122.082,altitude:18},tilt:67.5,range:4e3,mode:`SATELLITE`,gestureHandling:`COOPERATIVE`}),a=document.createElement(`img`);a.src=String(new URL(`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAACcUlEQVR4AazUA6wsZwCA0TNYXte2bdu2bdu2bdtW1I1TK6jbZ1vX3r+aoH7YL9kdn/EkSFGHZjQgRYQYSfZLUUIjWrJfI8pI/KXdDz744CNbW1u/+PDDD+/FulgBS2OpI444Yo0vv/zy+MmTJz/R1dX1ccgaGBhonTBhwjuvvvrq0VgKTchFCFdffbVrTm0244tE3RaHtvfEuZ/iOK6madqYmzF+1eqY75k4RDJtpGpXu66pU3X++ouWW0/Dzkf5pju5Z/PNN38ck1IAg7NUh99q+APXNjRttP2GabGoOvYHubo6+V9/uXJZUlcHADo+r+iaMNaSFz6+CyrojQFggW2pW4Hu7z/T89OXZrf+/v4c5kdd7C8tcRxx0RwVQoiQQ/o3MCmx+ClzjiJC9DcQCoux8PFEc476RxDyizL/0USFGoGQW4SW04gXqhEIcZH6o0hWqxEIkN+ReLsaghCtkqG1AiFZleKuNQShsCYNO9cQhIZNqVuthiAsfDBJ6R/AIUOGjNW8D/ml/WPxsiS7E51FeiNN7zP/o5JFj7PwbiCgmv0EvHvVVVc9M3PmzOmh+9sQZj4RQuuzIfR8FcJgWxj2a88999xb559//h04AcfutNNO51cqlbfDwMzw6wf4U+yP1SDgDZyGE3beeefzLr/88ut/+x1//PGX4VgcjYOwIzbBBtgQW2IP7JXNXyxCwKt4D1PRhgEAQBW9aEcXBhEhj3rE6EBrCgjoxhRMQi8CAEKG9mdYFRFitCHCAAYiBLyMVzAE4zI8+HvhH+ZHyBwhBeBvdyuYvUL2A7EaN9fgL6OPgaMG/qemgX9huYBSgwHnr9+YKVsfRAAAAABJRU5ErkJggg==`,``+import.meta.url));let o=new t({position:{lat:37.434,lng:-122.082}}),s=document.createElement(`template`);s.content.append(a),o.append(s),i.append(o);let c=new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20enable-background='new%200%200%20192%20192'%20height='192'%20viewBox='0%200%20192%20192'%20width='192'%3e%3crect%20fill='none'%20height='192'%20width='192'/%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M113.89,84.4l25.27-19.25l11.22-24.21c-7.47-14.26-20.37-25.24-35.88-30.11L91.18,26.58L77.95,54.29l0,0%20c4.3-5.21,10.75-8.49,18-8.49c13.02,0,23.43,10.53,23.43,23.43C119.37,75,117.29,80.32,113.89,84.4z'%20fill='%234285F4'/%3e%3cpath%20d='M95.94,8c-18.9,0-35.65,8.49-46.97,21.96l10.78,17.66l18.2,6.68c0.11-0.11,36.56-43.46,36.56-43.46%20C108.62,9.02,102.39,8,95.94,8z'%20fill='%231A73E8'/%3e%3cpath%20d='M113.89,84.4c-4.3,5.09-10.7,8.38-17.95,8.38c-13.02,0-23.43-10.53-23.43-23.43%20c0-5.55,2.26-11.09,5.43-15.05L51.09,73.5L40.71,98.66c6.45,14.03,17.09,25.35,28.07,39.5l28.78-22.9L113.89,84.4z'%20fill='%23FBBC04'/%3e%3cpath%20d='M157.4,69.35c0-10.3-2.6-19.92-7.02-28.41l-81.61,97.22c3.62,4.64,7.13,9.62,10.64,15.05%20C91.87,172.46,88.13,184,96.06,184c8.04,0,4.53-11.54,16.98-30.79C133.52,121.18,157.4,106.58,157.4,69.35z'%20fill='%2334A853'/%3e%3cpath%20d='M77.95,54.29L48.97,29.96C40.03,40.6,34.6,54.41,34.6,69.35c0,11.54,2.26,20.94,6.11,29.31L77.95,54.29z'%20fill='%23EA4335'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg/%3e%3cg/%3e%3cg/%3e%3c/svg%3e`,``+import.meta.url),l=new n({background:`white`,glyphSrc:new URL(c)}),u=new t({position:{lat:37.425,lng:-122.07,altitude:100},extruded:!0,altitudeMode:`ABSOLUTE`});u.append(l);try{i.append(u)}catch(e){console.error(e)}let d=new r({id:`ChIJN5Nz71W3j4ARhx5bwpTQEGg`});await d.fetchFields({fields:[`location`,`displayName`,`svgIconMaskURI`,`iconBackgroundColor`]});let f=new n({background:d.iconBackgroundColor,glyphSrc:new URL(String(d.svgIconMaskURI))}),p=new t({position:d.location?.toJSON()});p.append(f),i.append(p);let m=new DOMParser().parseFromString(``,`image/svg+xml`).documentElement,h=new t({position:{lat:37.425,lng:-122.094}}),g=document.createElement(`template`);g.content.append(m),h.append(g),i.append(h),document.body.append(i)}e(); \ No newline at end of file diff --git a/dist/samples/3d-marker-graphics/dist/index.html b/dist/samples/3d-marker-graphics/dist/index.html index 66a428f5c..9d82b0a9d 100644 --- a/dist/samples/3d-marker-graphics/dist/index.html +++ b/dist/samples/3d-marker-graphics/dist/index.html @@ -9,7 +9,7 @@ Map - + diff --git a/dist/samples/3d-marker-graphics/docs/index.js b/dist/samples/3d-marker-graphics/docs/index.js index 0e452a7a6..29e889a3e 100644 --- a/dist/samples/3d-marker-graphics/docs/index.js +++ b/dist/samples/3d-marker-graphics/docs/index.js @@ -6,10 +6,12 @@ // [START maps_3d_marker_graphics] async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map3DElement, Marker3DElement }, { PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const map = new Map3DElement({ center: { lat: 37.426, lng: -122.082, altitude: 18 }, diff --git a/dist/samples/3d-marker-graphics/docs/index.ts b/dist/samples/3d-marker-graphics/docs/index.ts index 961546351..94e07d54a 100644 --- a/dist/samples/3d-marker-graphics/docs/index.ts +++ b/dist/samples/3d-marker-graphics/docs/index.ts @@ -6,10 +6,12 @@ // [START maps_3d_marker_graphics] async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map3DElement, Marker3DElement }, { PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const map = new Map3DElement({ center: { lat: 37.426, lng: -122.082, altitude: 18 }, diff --git a/dist/samples/3d-marker-graphics/jsfiddle/demo.js b/dist/samples/3d-marker-graphics/jsfiddle/demo.js index 5a0719083..4581e92cf 100644 --- a/dist/samples/3d-marker-graphics/jsfiddle/demo.js +++ b/dist/samples/3d-marker-graphics/jsfiddle/demo.js @@ -5,10 +5,12 @@ */ async function init() { - const { Map3DElement, Marker3DElement } = - await google.maps.importLibrary('maps3d'); - const { PinElement } = await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map3DElement, Marker3DElement }, { PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps3d'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const map = new Map3DElement({ center: { lat: 37.426, lng: -122.082, altitude: 18 }, diff --git a/dist/samples/advanced-markers-accessibility/app/index.ts b/dist/samples/advanced-markers-accessibility/app/index.ts index eee4bf54c..2764fec9e 100644 --- a/dist/samples/advanced-markers-accessibility/app/index.ts +++ b/dist/samples/advanced-markers-accessibility/app/index.ts @@ -9,9 +9,11 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement, PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set LatLng and title text for the markers. The first marker (Boynton Pass) // receives the initial focus when tab is pressed. Use arrow keys to move diff --git a/dist/samples/advanced-markers-accessibility/dist/assets/index-5wyLXQLC.js b/dist/samples/advanced-markers-accessibility/dist/assets/index-5wyLXQLC.js deleted file mode 100644 index f05b38dde..000000000 --- a/dist/samples/advanced-markers-accessibility/dist/assets/index-5wyLXQLC.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t,InfoWindow:n}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:r,PinElement:i}=await google.maps.importLibrary(`marker`),a=[{position:{lat:34.8791806,lng:-111.8265049},title:`Boynton Pass`},{position:{lat:34.8559195,lng:-111.7988186},title:`Airport Mesa`},{position:{lat:34.832149,lng:-111.7695277},title:`Chapel of the Holy Cross`},{position:{lat:34.823736,lng:-111.8001857},title:`Red Rock Crossing`},{position:{lat:34.800326,lng:-111.7665047},title:`Bell Rock`}],o=new n;a.forEach(({position:t,title:n},a)=>{let s=new i({glyphText:`${a+1}`,scale:1.5}),c=new r({position:t,title:`${a+1}. ${n}`,gmpClickable:!0});c.append(s),e.append(c),c.addEventListener(`gmp-click`,e=>{let{target:t}=e;o.close(),o.setContent(c.title),o.open(c.map,c)})})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-accessibility/dist/assets/index-r2saZnTF.js b/dist/samples/advanced-markers-accessibility/dist/assets/index-r2saZnTF.js new file mode 100644 index 000000000..eaff072fb --- /dev/null +++ b/dist/samples/advanced-markers-accessibility/dist/assets/index-r2saZnTF.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t,InfoWindow:n},{AdvancedMarkerElement:r,PinElement:i}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),a=[{position:{lat:34.8791806,lng:-111.8265049},title:`Boynton Pass`},{position:{lat:34.8559195,lng:-111.7988186},title:`Airport Mesa`},{position:{lat:34.832149,lng:-111.7695277},title:`Chapel of the Holy Cross`},{position:{lat:34.823736,lng:-111.8001857},title:`Red Rock Crossing`},{position:{lat:34.800326,lng:-111.7665047},title:`Bell Rock`}],o=new n;a.forEach(({position:t,title:n},a)=>{let s=new i({glyphText:`${a+1}`,scale:1.5}),c=new r({position:t,title:`${a+1}. ${n}`,gmpClickable:!0});c.append(s),e.append(c),c.addEventListener(`gmp-click`,e=>{let{target:t}=e;o.close(),o.setContent(c.title),o.open(c.map,c)})})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-accessibility/dist/index.html b/dist/samples/advanced-markers-accessibility/dist/index.html index 8459f6ce6..d486638ca 100644 --- a/dist/samples/advanced-markers-accessibility/dist/index.html +++ b/dist/samples/advanced-markers-accessibility/dist/index.html @@ -14,7 +14,7 @@ - + diff --git a/dist/samples/advanced-markers-accessibility/docs/index.js b/dist/samples/advanced-markers-accessibility/docs/index.js index 2974257fc..3b4a3ee3e 100644 --- a/dist/samples/advanced-markers-accessibility/docs/index.js +++ b/dist/samples/advanced-markers-accessibility/docs/index.js @@ -10,9 +10,11 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement, PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set LatLng and title text for the markers. The first marker (Boynton Pass) // receives the initial focus when tab is pressed. Use arrow keys to move diff --git a/dist/samples/advanced-markers-accessibility/docs/index.ts b/dist/samples/advanced-markers-accessibility/docs/index.ts index eee4bf54c..2764fec9e 100644 --- a/dist/samples/advanced-markers-accessibility/docs/index.ts +++ b/dist/samples/advanced-markers-accessibility/docs/index.ts @@ -9,9 +9,11 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement, PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set LatLng and title text for the markers. The first marker (Boynton Pass) // receives the initial focus when tab is pressed. Use arrow keys to move diff --git a/dist/samples/advanced-markers-accessibility/jsfiddle/demo.js b/dist/samples/advanced-markers-accessibility/jsfiddle/demo.js index e6b2c150f..d043e7971 100644 --- a/dist/samples/advanced-markers-accessibility/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-accessibility/jsfiddle/demo.js @@ -9,9 +9,11 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement, PinElement }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set LatLng and title text for the markers. The first marker (Boynton Pass) // receives the initial focus when tab is pressed. Use arrow keys to move diff --git a/dist/samples/advanced-markers-altitude/app/index.ts b/dist/samples/advanced-markers-altitude/app/index.ts index 4bbd1cea2..99a4801ba 100644 --- a/dist/samples/advanced-markers-altitude/app/index.ts +++ b/dist/samples/advanced-markers-altitude/app/index.ts @@ -9,9 +9,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); mapElement.innerMap.setOptions({ tilt: 67.5, diff --git a/dist/samples/advanced-markers-altitude/dist/assets/index-B7uaOdzp.js b/dist/samples/advanced-markers-altitude/dist/assets/index-WuUkFzG8.js similarity index 62% rename from dist/samples/advanced-markers-altitude/dist/assets/index-B7uaOdzp.js rename to dist/samples/advanced-markers-altitude/dist/assets/index-WuUkFzG8.js index 9e82bb1f3..1f9bfd99b 100644 --- a/dist/samples/advanced-markers-altitude/dist/assets/index-B7uaOdzp.js +++ b/dist/samples/advanced-markers-altitude/dist/assets/index-WuUkFzG8.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:n,PinElement:r}=await google.maps.importLibrary(`marker`);e.innerMap.setOptions({tilt:67.5,heading:45});let i=new r({background:`#4b2e83`,borderColor:`#b7a57a`,glyphColor:`#b7a57a`,scale:2}),a=new n({position:{lat:47.65170843460547,lng:-122.30754,altitude:20}});a.append(i),e.append(a)}t(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t},{AdvancedMarkerElement:n,PinElement:r}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]);e.innerMap.setOptions({tilt:67.5,heading:45});let i=new r({background:`#4b2e83`,borderColor:`#b7a57a`,glyphColor:`#b7a57a`,scale:2}),a=new n({position:{lat:47.65170843460547,lng:-122.30754,altitude:20}});a.append(i),e.append(a)}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-altitude/dist/index.html b/dist/samples/advanced-markers-altitude/dist/index.html index 899454368..6b4336fc0 100644 --- a/dist/samples/advanced-markers-altitude/dist/index.html +++ b/dist/samples/advanced-markers-altitude/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/advanced-markers-altitude/docs/index.js b/dist/samples/advanced-markers-altitude/docs/index.js index 7e44f2831..4e60b1a37 100644 --- a/dist/samples/advanced-markers-altitude/docs/index.js +++ b/dist/samples/advanced-markers-altitude/docs/index.js @@ -10,9 +10,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); mapElement.innerMap.setOptions({ tilt: 67.5, diff --git a/dist/samples/advanced-markers-altitude/docs/index.ts b/dist/samples/advanced-markers-altitude/docs/index.ts index 4bbd1cea2..99a4801ba 100644 --- a/dist/samples/advanced-markers-altitude/docs/index.ts +++ b/dist/samples/advanced-markers-altitude/docs/index.ts @@ -9,9 +9,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); mapElement.innerMap.setOptions({ tilt: 67.5, diff --git a/dist/samples/advanced-markers-altitude/jsfiddle/demo.js b/dist/samples/advanced-markers-altitude/jsfiddle/demo.js index 078604371..53d8f5437 100644 --- a/dist/samples/advanced-markers-altitude/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-altitude/jsfiddle/demo.js @@ -9,9 +9,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); mapElement.innerMap.setOptions({ tilt: 67.5, diff --git a/dist/samples/advanced-markers-animation/app/index.ts b/dist/samples/advanced-markers-animation/app/index.ts index 310be92e9..d9928c520 100644 --- a/dist/samples/advanced-markers-animation/app/index.ts +++ b/dist/samples/advanced-markers-animation/app/index.ts @@ -43,10 +43,15 @@ const intersectionObserver = new IntersectionObserver((entries) => { async function initMap(): Promise { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { event, ControlPosition } = await google.maps.importLibrary('core'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [ + { Map }, + { event, ControlPosition }, + { AdvancedMarkerElement, PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + google.maps.importLibrary('marker'), + ]); const position = { lat: 37.4242011827985, lng: -122.09242296450893 }; diff --git a/dist/samples/advanced-markers-animation/dist/assets/index-BzGbnwNZ.js b/dist/samples/advanced-markers-animation/dist/assets/index-BzGbnwNZ.js deleted file mode 100644 index 3b752d119..000000000 --- a/dist/samples/advanced-markers-animation/dist/assets/index-BzGbnwNZ.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=e.getBounds(),n=t.getSouthWest().lat(),r=t.getSouthWest().lng(),i=t.getNorthEast().lat(),a=t.getNorthEast().lng(),o=i-n,s=a-r;return a{for(let n of e)n.isIntersecting&&(n.target.classList.add(`drop`),t.unobserve(n.target))});async function n(){let{Map:e}=await google.maps.importLibrary(`maps`),{event:t,ControlPosition:n}=await google.maps.importLibrary(`core`),{AdvancedMarkerElement:a,PinElement:o}=await google.maps.importLibrary(`marker`),s=new e(document.getElementById(`map`),{zoom:14,center:{lat:37.4242011827985,lng:-122.09242296450893},mapId:`4504f8b37365c3d0`});t.addListenerOnce(s,`idle`,()=>{for(let e=0;e<100;e++)r(s,a,o)});let c=document.createElement(`div`),l=document.createElement(`button`);l.classList.add(`ui-button`),l.innerText=`Reset the example`,l.addEventListener(`click`,()=>{i()}),c.appendChild(l),s.controls[n.TOP_CENTER].push(c)}function r(n,r,i){let a=new i().element;new r({position:e(n),map:n,content:a}),a.style.opacity=`0`,a.addEventListener(`animationend`,e=>{a.classList.remove(`drop`),a.style.opacity=`1`});let o=2+Math.random();a.style.setProperty(`--delay-time`,o+`s`),t.observe(a)}function i(){let e=document.getElementById(`mapContainer`);document.getElementById(`map`).remove();let t=document.createElement(`div`);t.id=`map`,e.appendChild(t),n()}n(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-animation/dist/assets/index-O6bgeeNB.js b/dist/samples/advanced-markers-animation/dist/assets/index-O6bgeeNB.js new file mode 100644 index 000000000..864a23196 --- /dev/null +++ b/dist/samples/advanced-markers-animation/dist/assets/index-O6bgeeNB.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=e.getBounds(),n=t.getSouthWest().lat(),r=t.getSouthWest().lng(),i=t.getNorthEast().lat(),a=t.getNorthEast().lng(),o=i-n,s=a-r;return a{for(let n of e)n.isIntersecting&&(n.target.classList.add(`drop`),t.unobserve(n.target))});async function n(){let[{Map:e},{event:t,ControlPosition:n},{AdvancedMarkerElement:a,PinElement:o}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`),google.maps.importLibrary(`marker`)]),s=new e(document.getElementById(`map`),{zoom:14,center:{lat:37.4242011827985,lng:-122.09242296450893},mapId:`4504f8b37365c3d0`});t.addListenerOnce(s,`idle`,()=>{for(let e=0;e<100;e++)r(s,a,o)});let c=document.createElement(`div`),l=document.createElement(`button`);l.classList.add(`ui-button`),l.innerText=`Reset the example`,l.addEventListener(`click`,()=>{i()}),c.appendChild(l),s.controls[n.TOP_CENTER].push(c)}function r(n,r,i){let a=new i().element;new r({position:e(n),map:n,content:a}),a.style.opacity=`0`,a.addEventListener(`animationend`,e=>{a.classList.remove(`drop`),a.style.opacity=`1`});let o=2+Math.random();a.style.setProperty(`--delay-time`,o+`s`),t.observe(a)}function i(){let e=document.getElementById(`mapContainer`);document.getElementById(`map`).remove();let t=document.createElement(`div`);t.id=`map`,e.appendChild(t),n()}n(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-animation/dist/index.html b/dist/samples/advanced-markers-animation/dist/index.html index 80b134040..34ad86b16 100644 --- a/dist/samples/advanced-markers-animation/dist/index.html +++ b/dist/samples/advanced-markers-animation/dist/index.html @@ -9,7 +9,7 @@ Advanced Markers CSS Animation - + diff --git a/dist/samples/advanced-markers-animation/docs/index.js b/dist/samples/advanced-markers-animation/docs/index.js index c48007ea9..c210ee846 100644 --- a/dist/samples/advanced-markers-animation/docs/index.js +++ b/dist/samples/advanced-markers-animation/docs/index.js @@ -44,10 +44,15 @@ const intersectionObserver = new IntersectionObserver((entries) => { async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { event, ControlPosition } = await google.maps.importLibrary('core'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [ + { Map }, + { event, ControlPosition }, + { AdvancedMarkerElement, PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + google.maps.importLibrary('marker'), + ]); const position = { lat: 37.4242011827985, lng: -122.09242296450893 }; diff --git a/dist/samples/advanced-markers-animation/docs/index.ts b/dist/samples/advanced-markers-animation/docs/index.ts index 310be92e9..d9928c520 100644 --- a/dist/samples/advanced-markers-animation/docs/index.ts +++ b/dist/samples/advanced-markers-animation/docs/index.ts @@ -43,10 +43,15 @@ const intersectionObserver = new IntersectionObserver((entries) => { async function initMap(): Promise { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { event, ControlPosition } = await google.maps.importLibrary('core'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [ + { Map }, + { event, ControlPosition }, + { AdvancedMarkerElement, PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + google.maps.importLibrary('marker'), + ]); const position = { lat: 37.4242011827985, lng: -122.09242296450893 }; diff --git a/dist/samples/advanced-markers-animation/jsfiddle/demo.js b/dist/samples/advanced-markers-animation/jsfiddle/demo.js index d250d054c..f51a1801b 100644 --- a/dist/samples/advanced-markers-animation/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-animation/jsfiddle/demo.js @@ -43,10 +43,15 @@ const intersectionObserver = new IntersectionObserver((entries) => { async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { event, ControlPosition } = await google.maps.importLibrary('core'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [ + { Map }, + { event, ControlPosition }, + { AdvancedMarkerElement, PinElement }, + ] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + google.maps.importLibrary('marker'), + ]); const position = { lat: 37.4242011827985, lng: -122.09242296450893 }; diff --git a/dist/samples/advanced-markers-basic-style/app/index.ts b/dist/samples/advanced-markers-basic-style/app/index.ts index ed97850c2..57189c98a 100644 --- a/dist/samples/advanced-markers-basic-style/app/index.ts +++ b/dist/samples/advanced-markers-basic-style/app/index.ts @@ -10,9 +10,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Each PinElement is paired with a marker to demonstrate setting each parameter. diff --git a/dist/samples/advanced-markers-basic-style/dist/assets/index-B7YR_R2m.js b/dist/samples/advanced-markers-basic-style/dist/assets/index-B7YR_R2m.js new file mode 100644 index 000000000..6057b5588 --- /dev/null +++ b/dist/samples/advanced-markers-basic-style/dist/assets/index-B7YR_R2m.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),new DOMParser;var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t},{AdvancedMarkerElement:n,PinElement:r}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),i=new n({position:{lat:37.419,lng:-122.03},title:`Title text for the marker at lat: 37.419, lng: -122.03`});e.append(i);let a=new r({scale:1.5}),o=new n({position:{lat:37.419,lng:-122.02}});o.append(a),e.append(o);let s=new r({background:`#FBBC04`}),c=new n({position:{lat:37.419,lng:-122.01}});c.append(s),e.append(c);let l=new r({borderColor:`#137333`}),u=new n({position:{lat:37.415,lng:-122.035}});u.append(l),e.append(u);let d=new r({glyphColor:`white`}),f=new n({position:{lat:37.415,lng:-122.025}});f.append(d),e.append(f);let p=new r({glyphText:`T`,glyphColor:`white`}),m=new n({position:{lat:37.415,lng:-122.015}});m.append(p),e.append(m);let h=new r({glyphText:``}),g=new n({position:{lat:37.415,lng:-122.005}});g.append(h),e.append(g)}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-basic-style/dist/assets/index-pNDUTK-R.js b/dist/samples/advanced-markers-basic-style/dist/assets/index-pNDUTK-R.js deleted file mode 100644 index 94748f7e0..000000000 --- a/dist/samples/advanced-markers-basic-style/dist/assets/index-pNDUTK-R.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),new DOMParser;var e=document.querySelector(`gmp-map`);async function t(){let{Map:t}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:n,PinElement:r}=await google.maps.importLibrary(`marker`),i=new n({position:{lat:37.419,lng:-122.03},title:`Title text for the marker at lat: 37.419, lng: -122.03`});e.append(i);let a=new r({scale:1.5}),o=new n({position:{lat:37.419,lng:-122.02}});o.append(a),e.append(o);let s=new r({background:`#FBBC04`}),c=new n({position:{lat:37.419,lng:-122.01}});c.append(s),e.append(c);let l=new r({borderColor:`#137333`}),u=new n({position:{lat:37.415,lng:-122.035}});u.append(l),e.append(u);let d=new r({glyphColor:`white`}),f=new n({position:{lat:37.415,lng:-122.025}});f.append(d),e.append(f);let p=new r({glyphText:`T`,glyphColor:`white`}),m=new n({position:{lat:37.415,lng:-122.015}});m.append(p),e.append(m);let h=new r({glyphText:``}),g=new n({position:{lat:37.415,lng:-122.005}});g.append(h),e.append(g)}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-basic-style/dist/index.html b/dist/samples/advanced-markers-basic-style/dist/index.html index 128986925..66be26b7f 100644 --- a/dist/samples/advanced-markers-basic-style/dist/index.html +++ b/dist/samples/advanced-markers-basic-style/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/advanced-markers-basic-style/docs/index.js b/dist/samples/advanced-markers-basic-style/docs/index.js index c87d97593..173633c0f 100644 --- a/dist/samples/advanced-markers-basic-style/docs/index.js +++ b/dist/samples/advanced-markers-basic-style/docs/index.js @@ -11,9 +11,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Each PinElement is paired with a marker to demonstrate setting each parameter. diff --git a/dist/samples/advanced-markers-basic-style/docs/index.ts b/dist/samples/advanced-markers-basic-style/docs/index.ts index ed97850c2..57189c98a 100644 --- a/dist/samples/advanced-markers-basic-style/docs/index.ts +++ b/dist/samples/advanced-markers-basic-style/docs/index.ts @@ -10,9 +10,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Each PinElement is paired with a marker to demonstrate setting each parameter. diff --git a/dist/samples/advanced-markers-basic-style/jsfiddle/demo.js b/dist/samples/advanced-markers-basic-style/jsfiddle/demo.js index 3ac1935b1..4579015ec 100644 --- a/dist/samples/advanced-markers-basic-style/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-basic-style/jsfiddle/demo.js @@ -10,9 +10,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement, PinElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Each PinElement is paired with a marker to demonstrate setting each parameter. diff --git a/dist/samples/advanced-markers-collision/app/index.ts b/dist/samples/advanced-markers-collision/app/index.ts index 5182c456f..c0eb01810 100644 --- a/dist/samples/advanced-markers-collision/app/index.ts +++ b/dist/samples/advanced-markers-collision/app/index.ts @@ -11,8 +11,10 @@ const mapElement = document.querySelector('gmp-map')!; // Initialize and add the map async function initMap(): Promise { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markers: google.maps.marker.AdvancedMarkerElement[] = []; diff --git a/dist/samples/advanced-markers-collision/dist/assets/index--X_EtQqi.js b/dist/samples/advanced-markers-collision/dist/assets/index--X_EtQqi.js deleted file mode 100644 index 5fdc0e95d..000000000 --- a/dist/samples/advanced-markers-collision/dist/assets/index--X_EtQqi.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:n}=await google.maps.importLibrary(`marker`),r=[],i=`REQUIRED`,a=new mdc.select.MDCSelect(document.querySelector(`.mdc-select`));a.listen(`MDCSelect:change`,()=>{r.forEach(e=>{e.collisionBehavior=a.value})}),a.value=i,[[-122.3402,47.6093],[-122.3402,47.6094],[-122.3403,47.6094],[-122.3384,47.6098],[-122.3389,47.6095],[-122.3396,47.6095],[-122.3379,47.6097],[-122.3378,47.6097],[-122.3396,47.6091],[-122.3383,47.6089],[-122.3379,47.6093],[-122.3381,47.6095],[-122.3378,47.6095]].forEach(([t,a])=>{let o=new n({position:{lat:a,lng:t},collisionBehavior:i});e.appendChild(o),r.push(o)})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-collision/dist/assets/index-tx3oKzgM.js b/dist/samples/advanced-markers-collision/dist/assets/index-tx3oKzgM.js new file mode 100644 index 000000000..95964fbfc --- /dev/null +++ b/dist/samples/advanced-markers-collision/dist/assets/index-tx3oKzgM.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t},{AdvancedMarkerElement:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),r=[],i=`REQUIRED`,a=new mdc.select.MDCSelect(document.querySelector(`.mdc-select`));a.listen(`MDCSelect:change`,()=>{r.forEach(e=>{e.collisionBehavior=a.value})}),a.value=i,[[-122.3402,47.6093],[-122.3402,47.6094],[-122.3403,47.6094],[-122.3384,47.6098],[-122.3389,47.6095],[-122.3396,47.6095],[-122.3379,47.6097],[-122.3378,47.6097],[-122.3396,47.6091],[-122.3383,47.6089],[-122.3379,47.6093],[-122.3381,47.6095],[-122.3378,47.6095]].forEach(([t,a])=>{let o=new n({position:{lat:a,lng:t},collisionBehavior:i});e.appendChild(o),r.push(o)})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-collision/dist/index.html b/dist/samples/advanced-markers-collision/dist/index.html index 8062314fe..d86de58f6 100644 --- a/dist/samples/advanced-markers-collision/dist/index.html +++ b/dist/samples/advanced-markers-collision/dist/index.html @@ -21,7 +21,7 @@ - + diff --git a/dist/samples/advanced-markers-collision/docs/index.js b/dist/samples/advanced-markers-collision/docs/index.js index 87bc24139..1b4c910b5 100644 --- a/dist/samples/advanced-markers-collision/docs/index.js +++ b/dist/samples/advanced-markers-collision/docs/index.js @@ -12,8 +12,10 @@ const mapElement = document.querySelector('gmp-map'); // Initialize and add the map async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markers = []; diff --git a/dist/samples/advanced-markers-collision/docs/index.ts b/dist/samples/advanced-markers-collision/docs/index.ts index 5182c456f..c0eb01810 100644 --- a/dist/samples/advanced-markers-collision/docs/index.ts +++ b/dist/samples/advanced-markers-collision/docs/index.ts @@ -11,8 +11,10 @@ const mapElement = document.querySelector('gmp-map')!; // Initialize and add the map async function initMap(): Promise { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markers: google.maps.marker.AdvancedMarkerElement[] = []; diff --git a/dist/samples/advanced-markers-collision/jsfiddle/demo.js b/dist/samples/advanced-markers-collision/jsfiddle/demo.js index a45b6ac3a..a9516778c 100644 --- a/dist/samples/advanced-markers-collision/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-collision/jsfiddle/demo.js @@ -12,8 +12,10 @@ const mapElement = document.querySelector('gmp-map'); // Initialize and add the map async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markers = []; diff --git a/dist/samples/advanced-markers-draggable/app/index.ts b/dist/samples/advanced-markers-draggable/app/index.ts index 94e96e921..697f37241 100644 --- a/dist/samples/advanced-markers-draggable/app/index.ts +++ b/dist/samples/advanced-markers-draggable/app/index.ts @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const infoWindow = new InfoWindow(); diff --git a/dist/samples/advanced-markers-draggable/dist/assets/index-x279N735.js b/dist/samples/advanced-markers-draggable/dist/assets/index-S-YVG_j8.js similarity index 60% rename from dist/samples/advanced-markers-draggable/dist/assets/index-x279N735.js rename to dist/samples/advanced-markers-draggable/dist/assets/index-S-YVG_j8.js index 4068c62ed..b324cabf6 100644 --- a/dist/samples/advanced-markers-draggable/dist/assets/index-x279N735.js +++ b/dist/samples/advanced-markers-draggable/dist/assets/index-S-YVG_j8.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t,InfoWindow:n}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:r}=await google.maps.importLibrary(`marker`),i=new n,a=new r({position:{lat:37.39094933041195,lng:-122.02503913145092},gmpDraggable:!0,title:`This marker is draggable.`});e.append(a),a.addListener(`dragend`,e=>{let t=a.position;i.close(),i.setContent(`Pin dropped at: ${JSON.stringify(t)}`),i.open(a.map,a)})}t(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t,InfoWindow:n},{AdvancedMarkerElement:r}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),i=new n,a=new r({position:{lat:37.39094933041195,lng:-122.02503913145092},gmpDraggable:!0,title:`This marker is draggable.`});e.append(a),a.addListener(`dragend`,e=>{let t=a.position;i.close(),i.setContent(`Pin dropped at: ${JSON.stringify(t)}`),i.open(a.map,a)})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-draggable/dist/index.html b/dist/samples/advanced-markers-draggable/dist/index.html index deffab17a..e7f0531a4 100644 --- a/dist/samples/advanced-markers-draggable/dist/index.html +++ b/dist/samples/advanced-markers-draggable/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/advanced-markers-draggable/docs/index.js b/dist/samples/advanced-markers-draggable/docs/index.js index 96101cbf7..ce820b4c0 100644 --- a/dist/samples/advanced-markers-draggable/docs/index.js +++ b/dist/samples/advanced-markers-draggable/docs/index.js @@ -10,8 +10,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const infoWindow = new InfoWindow(); diff --git a/dist/samples/advanced-markers-draggable/docs/index.ts b/dist/samples/advanced-markers-draggable/docs/index.ts index 94e96e921..697f37241 100644 --- a/dist/samples/advanced-markers-draggable/docs/index.ts +++ b/dist/samples/advanced-markers-draggable/docs/index.ts @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const infoWindow = new InfoWindow(); diff --git a/dist/samples/advanced-markers-draggable/jsfiddle/demo.js b/dist/samples/advanced-markers-draggable/jsfiddle/demo.js index 1dc8fd753..f63bb9f97 100644 --- a/dist/samples/advanced-markers-draggable/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-draggable/jsfiddle/demo.js @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const infoWindow = new InfoWindow(); diff --git a/dist/samples/advanced-markers-graphics/app/index.ts b/dist/samples/advanced-markers-graphics/app/index.ts index 17244bfee..69da7e601 100644 --- a/dist/samples/advanced-markers-graphics/app/index.ts +++ b/dist/samples/advanced-markers-graphics/app/index.ts @@ -7,10 +7,12 @@ // [START maps_advanced_markers_graphics] async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map }, { AdvancedMarkerElement, PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/advanced-markers-graphics/dist/assets/index-BiFoaSQY.js b/dist/samples/advanced-markers-graphics/dist/assets/index-BiFoaSQY.js new file mode 100644 index 000000000..431e8ead4 --- /dev/null +++ b/dist/samples/advanced-markers-graphics/dist/assets/index-BiFoaSQY.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{Map:e},{AdvancedMarkerElement:t,PinElement:n},{Place:r}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`),google.maps.importLibrary(`places`)]),i=document.querySelector(`gmp-map`),a=new DOMParser().parseFromString(``,`image/svg+xml`).documentElement,o=new t({position:{lat:37.42475,lng:-122.094},title:`A marker using a custom SVG image.`,anchorLeft:`-50%`,anchorTop:`-50%`});o.append(a),i.append(o);let s=document.createElement(`img`);s.src=new URL(``+new URL(`../beachflag.png`,import.meta.url).href,``+import.meta.url).href;let c=new t({position:{lat:37.434,lng:-122.082},title:`A marker using a custom PNG Image`,anchorLeft:`0px`,anchorTop:`100%`});c.append(s),i.append(c);let l=new n({glyphSrc:new URL(``+new URL(`../google_logo_g.svg`,import.meta.url).href,``+import.meta.url)}),u=new t({position:{lat:37.425,lng:-122.07},title:`A marker using a custom SVG for the glyph.`});u.append(l),i.append(u);let d=new r({id:`ChIJN5Nz71W3j4ARhx5bwpTQEGg`});await d.fetchFields({fields:[`location`,`displayName`,`svgIconMaskURI`,`iconBackgroundColor`]});let f=new n({background:d.iconBackgroundColor,glyphSrc:new URL(String(d.svgIconMaskURI))}),p=new t({position:d.location,title:d.displayName});p.append(f),i.append(p)}e(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-graphics/dist/assets/index-CWiJcT5_.js b/dist/samples/advanced-markers-graphics/dist/assets/index-CWiJcT5_.js deleted file mode 100644 index af8410642..000000000 --- a/dist/samples/advanced-markers-graphics/dist/assets/index-CWiJcT5_.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{Map:e}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:t,PinElement:n}=await google.maps.importLibrary(`marker`),{Place:r}=await google.maps.importLibrary(`places`),i=document.querySelector(`gmp-map`),a=new DOMParser().parseFromString(``,`image/svg+xml`).documentElement,o=new t({position:{lat:37.42475,lng:-122.094},title:`A marker using a custom SVG image.`,anchorLeft:`-50%`,anchorTop:`-50%`});o.append(a),i.append(o);let s=document.createElement(`img`);s.src=new URL(``+new URL(`../beachflag.png`,import.meta.url).href,``+import.meta.url).href;let c=new t({position:{lat:37.434,lng:-122.082},title:`A marker using a custom PNG Image`,anchorLeft:`0px`,anchorTop:`100%`});c.append(s),i.append(c);let l=new n({glyphSrc:new URL(``+new URL(`../google_logo_g.svg`,import.meta.url).href,``+import.meta.url)}),u=new t({position:{lat:37.425,lng:-122.07},title:`A marker using a custom SVG for the glyph.`});u.append(l),i.append(u);let d=new r({id:`ChIJN5Nz71W3j4ARhx5bwpTQEGg`});await d.fetchFields({fields:[`location`,`displayName`,`svgIconMaskURI`,`iconBackgroundColor`]});let f=new n({background:d.iconBackgroundColor,glyphSrc:new URL(String(d.svgIconMaskURI))}),p=new t({position:d.location,title:d.displayName});p.append(f),i.append(p)}e(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-graphics/dist/index.html b/dist/samples/advanced-markers-graphics/dist/index.html index 17e7152bf..a594d172d 100644 --- a/dist/samples/advanced-markers-graphics/dist/index.html +++ b/dist/samples/advanced-markers-graphics/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/samples/advanced-markers-graphics/docs/index.js b/dist/samples/advanced-markers-graphics/docs/index.js index 74156b4af..b048654a9 100644 --- a/dist/samples/advanced-markers-graphics/docs/index.js +++ b/dist/samples/advanced-markers-graphics/docs/index.js @@ -7,10 +7,12 @@ // [START maps_advanced_markers_graphics] async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map }, { AdvancedMarkerElement, PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/advanced-markers-graphics/docs/index.ts b/dist/samples/advanced-markers-graphics/docs/index.ts index 17244bfee..69da7e601 100644 --- a/dist/samples/advanced-markers-graphics/docs/index.ts +++ b/dist/samples/advanced-markers-graphics/docs/index.ts @@ -7,10 +7,12 @@ // [START maps_advanced_markers_graphics] async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map }, { AdvancedMarkerElement, PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/advanced-markers-graphics/jsfiddle/demo.js b/dist/samples/advanced-markers-graphics/jsfiddle/demo.js index a13705ec2..9b40ddf82 100644 --- a/dist/samples/advanced-markers-graphics/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-graphics/jsfiddle/demo.js @@ -6,10 +6,12 @@ async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement, PinElement } = - await google.maps.importLibrary('marker'); - const { Place } = await google.maps.importLibrary('places'); + const [{ Map }, { AdvancedMarkerElement, PinElement }, { Place }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('places'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/advanced-markers-html-simple/app/index.ts b/dist/samples/advanced-markers-html-simple/app/index.ts index 9ad1ef0c3..2d7c2d4b8 100644 --- a/dist/samples/advanced-markers-html-simple/app/index.ts +++ b/dist/samples/advanced-markers-html-simple/app/index.ts @@ -10,8 +10,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const priceTag = document.createElement('div'); priceTag.className = 'price-tag'; diff --git a/dist/samples/advanced-markers-html-simple/dist/assets/index-_aMT7yYs.js b/dist/samples/advanced-markers-html-simple/dist/assets/index-BANo6Td5.js similarity index 67% rename from dist/samples/advanced-markers-html-simple/dist/assets/index-_aMT7yYs.js rename to dist/samples/advanced-markers-html-simple/dist/assets/index-BANo6Td5.js index f85d66cc9..4ef0351fa 100644 --- a/dist/samples/advanced-markers-html-simple/dist/assets/index-_aMT7yYs.js +++ b/dist/samples/advanced-markers-html-simple/dist/assets/index-BANo6Td5.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:n}=await google.maps.importLibrary(`marker`),r=document.createElement(`div`);r.className=`price-tag`,r.textContent=`$2.5M`;let i=new n({position:{lat:37.42,lng:-122.1}});i.append(r),e.append(i)}t(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t},{AdvancedMarkerElement:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),r=document.createElement(`div`);r.className=`price-tag`,r.textContent=`$2.5M`;let i=new n({position:{lat:37.42,lng:-122.1}});i.append(r),e.append(i)}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-html-simple/dist/index.html b/dist/samples/advanced-markers-html-simple/dist/index.html index 2d1024e07..ae502f616 100644 --- a/dist/samples/advanced-markers-html-simple/dist/index.html +++ b/dist/samples/advanced-markers-html-simple/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/advanced-markers-html-simple/docs/index.js b/dist/samples/advanced-markers-html-simple/docs/index.js index 3028a484b..0a9d5d119 100644 --- a/dist/samples/advanced-markers-html-simple/docs/index.js +++ b/dist/samples/advanced-markers-html-simple/docs/index.js @@ -11,8 +11,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const priceTag = document.createElement('div'); priceTag.className = 'price-tag'; diff --git a/dist/samples/advanced-markers-html-simple/docs/index.ts b/dist/samples/advanced-markers-html-simple/docs/index.ts index 9ad1ef0c3..2d7c2d4b8 100644 --- a/dist/samples/advanced-markers-html-simple/docs/index.ts +++ b/dist/samples/advanced-markers-html-simple/docs/index.ts @@ -10,8 +10,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const priceTag = document.createElement('div'); priceTag.className = 'price-tag'; diff --git a/dist/samples/advanced-markers-html-simple/jsfiddle/demo.js b/dist/samples/advanced-markers-html-simple/jsfiddle/demo.js index 39727167b..a00417567 100644 --- a/dist/samples/advanced-markers-html-simple/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-html-simple/jsfiddle/demo.js @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const priceTag = document.createElement('div'); priceTag.className = 'price-tag'; diff --git a/dist/samples/advanced-markers-html/app/index.ts b/dist/samples/advanced-markers-html/app/index.ts index 66b48be80..a8dd23fc2 100644 --- a/dist/samples/advanced-markers-html/app/index.ts +++ b/dist/samples/advanced-markers-html/app/index.ts @@ -8,8 +8,10 @@ // [START maps_advanced_markers_html_snippet] async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const center = { lat: 37.43238031167444, lng: -122.16795397128632 }; const map = new Map(document.getElementById('map') as HTMLElement, { diff --git a/dist/samples/advanced-markers-html/dist/assets/index-C6J7GEtr.js b/dist/samples/advanced-markers-html/dist/assets/index-9uYg8EZE.js similarity index 84% rename from dist/samples/advanced-markers-html/dist/assets/index-C6J7GEtr.js rename to dist/samples/advanced-markers-html/dist/assets/index-9uYg8EZE.js index 1a2c93d95..dde8fffba 100644 --- a/dist/samples/advanced-markers-html/dist/assets/index-C6J7GEtr.js +++ b/dist/samples/advanced-markers-html/dist/assets/index-9uYg8EZE.js @@ -1,4 +1,4 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{Map:e}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:i}=await google.maps.importLibrary(`marker`),a=new e(document.getElementById(`map`),{zoom:11,center:{lat:37.43238031167444,lng:-122.16795397128632},mapId:`4504f8b37365c3d0`});for(let e of r){let r=new i({map:a,content:n(e),position:e.position,title:e.description});r.addListener(`click`,()=>{t(r,e)})}}function t(e,t){e.content.classList.contains(`highlight`)?(e.content.classList.remove(`highlight`),e.zIndex=null):(e.content.classList.add(`highlight`),e.zIndex=1)}function n(e){let t=document.createElement(`div`);return t.classList.add(`property`),t.innerHTML=` +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{Map:e},{AdvancedMarkerElement:i}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),a=new e(document.getElementById(`map`),{zoom:11,center:{lat:37.43238031167444,lng:-122.16795397128632},mapId:`4504f8b37365c3d0`});for(let e of r){let r=new i({map:a,content:n(e),position:e.position,title:e.description});r.addListener(`click`,()=>{t(r,e)})}}function t(e,t){e.content.classList.contains(`highlight`)?(e.content.classList.remove(`highlight`),e.zIndex=null):(e.content.classList.add(`highlight`),e.zIndex=1)}function n(e){let t=document.createElement(`div`);return t.classList.add(`property`),t.innerHTML=`
${e.type} diff --git a/dist/samples/advanced-markers-html/dist/index.html b/dist/samples/advanced-markers-html/dist/index.html index b7b73dc4b..1614fbe64 100644 --- a/dist/samples/advanced-markers-html/dist/index.html +++ b/dist/samples/advanced-markers-html/dist/index.html @@ -11,7 +11,7 @@ - + diff --git a/dist/samples/advanced-markers-html/docs/index.js b/dist/samples/advanced-markers-html/docs/index.js index 66b0d2264..8aa1dc8b5 100644 --- a/dist/samples/advanced-markers-html/docs/index.js +++ b/dist/samples/advanced-markers-html/docs/index.js @@ -9,8 +9,10 @@ // [START maps_advanced_markers_html_snippet] async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const center = { lat: 37.43238031167444, lng: -122.16795397128632 }; const map = new Map(document.getElementById('map'), { diff --git a/dist/samples/advanced-markers-html/docs/index.ts b/dist/samples/advanced-markers-html/docs/index.ts index 66b48be80..a8dd23fc2 100644 --- a/dist/samples/advanced-markers-html/docs/index.ts +++ b/dist/samples/advanced-markers-html/docs/index.ts @@ -8,8 +8,10 @@ // [START maps_advanced_markers_html_snippet] async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const center = { lat: 37.43238031167444, lng: -122.16795397128632 }; const map = new Map(document.getElementById('map') as HTMLElement, { diff --git a/dist/samples/advanced-markers-html/jsfiddle/demo.js b/dist/samples/advanced-markers-html/jsfiddle/demo.js index 160dfd787..dfd594774 100644 --- a/dist/samples/advanced-markers-html/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-html/jsfiddle/demo.js @@ -7,8 +7,10 @@ async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const center = { lat: 37.43238031167444, lng: -122.16795397128632 }; const map = new Map(document.getElementById('map'), { diff --git a/dist/samples/advanced-markers-simple/app/index.ts b/dist/samples/advanced-markers-simple/app/index.ts index 1ec7d3152..9e67a9325 100644 --- a/dist/samples/advanced-markers-simple/app/index.ts +++ b/dist/samples/advanced-markers-simple/app/index.ts @@ -10,8 +10,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const marker = new AdvancedMarkerElement({ position: { lat: 37.4239163, lng: -122.0947209 }, diff --git a/dist/samples/advanced-markers-simple/dist/assets/index-BJljvWET.js b/dist/samples/advanced-markers-simple/dist/assets/index-BrbTa-wB.js similarity index 73% rename from dist/samples/advanced-markers-simple/dist/assets/index-BJljvWET.js rename to dist/samples/advanced-markers-simple/dist/assets/index-BrbTa-wB.js index 6962da012..b4de1f6e7 100644 --- a/dist/samples/advanced-markers-simple/dist/assets/index-BJljvWET.js +++ b/dist/samples/advanced-markers-simple/dist/assets/index-BrbTa-wB.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:n}=await google.maps.importLibrary(`marker`),r=new n({position:{lat:37.4239163,lng:-122.0947209}});e.append(r)}t(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t},{AdvancedMarkerElement:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),r=new n({position:{lat:37.4239163,lng:-122.0947209}});e.append(r)}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-simple/dist/index.html b/dist/samples/advanced-markers-simple/dist/index.html index 00331ccb0..d7921cd44 100644 --- a/dist/samples/advanced-markers-simple/dist/index.html +++ b/dist/samples/advanced-markers-simple/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/advanced-markers-simple/docs/index.js b/dist/samples/advanced-markers-simple/docs/index.js index 3102cf3d6..ead9a0a8d 100644 --- a/dist/samples/advanced-markers-simple/docs/index.js +++ b/dist/samples/advanced-markers-simple/docs/index.js @@ -11,8 +11,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const marker = new AdvancedMarkerElement({ position: { lat: 37.4239163, lng: -122.0947209 }, diff --git a/dist/samples/advanced-markers-simple/docs/index.ts b/dist/samples/advanced-markers-simple/docs/index.ts index 1ec7d3152..9e67a9325 100644 --- a/dist/samples/advanced-markers-simple/docs/index.ts +++ b/dist/samples/advanced-markers-simple/docs/index.ts @@ -10,8 +10,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const marker = new AdvancedMarkerElement({ position: { lat: 37.4239163, lng: -122.0947209 }, diff --git a/dist/samples/advanced-markers-simple/jsfiddle/demo.js b/dist/samples/advanced-markers-simple/jsfiddle/demo.js index 54072dc64..b24165611 100644 --- a/dist/samples/advanced-markers-simple/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-simple/jsfiddle/demo.js @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const marker = new AdvancedMarkerElement({ position: { lat: 37.4239163, lng: -122.0947209 }, diff --git a/dist/samples/advanced-markers-zoom/app/index.ts b/dist/samples/advanced-markers-zoom/app/index.ts index 64051170c..8051f5dd9 100644 --- a/dist/samples/advanced-markers-zoom/app/index.ts +++ b/dist/samples/advanced-markers-zoom/app/index.ts @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markerOptions = [ { diff --git a/dist/samples/advanced-markers-zoom/dist/assets/index-D0XH5oA5.js b/dist/samples/advanced-markers-zoom/dist/assets/index-D0XH5oA5.js deleted file mode 100644 index 18eb35ed5..000000000 --- a/dist/samples/advanced-markers-zoom/dist/assets/index-D0XH5oA5.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{Map:t}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:n}=await google.maps.importLibrary(`marker`),r=[{position:{lat:37.4239163,lng:-122.094},title:`This marker is visible at zoom level 15 and higher.`,minZoom:14},{position:{lat:37.4245,lng:-122.096},title:`This marker is visible at zoom level 16 and higher.`,minZoom:15},{position:{lat:37.4249,lng:-122.095},title:`This marker is visible at zoom level 17 and higher.`,minZoom:16},{position:{lat:37.425,lng:-122.0955},title:`This marker is visible at zoom level 18 and higher.`,minZoom:17}],i=[];for(let{position:t,title:a}of r){let r=new n({position:t,title:a});e.append(r),i.push(r)}e.innerMap.addListener(`zoom_changed`,()=>{let t=e.innerMap.getZoom();for(let e=0;ea?n:null}})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-zoom/dist/assets/index-DPvxRWu-.js b/dist/samples/advanced-markers-zoom/dist/assets/index-DPvxRWu-.js new file mode 100644 index 000000000..8d76469f0 --- /dev/null +++ b/dist/samples/advanced-markers-zoom/dist/assets/index-DPvxRWu-.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{Map:t},{AdvancedMarkerElement:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),r=[{position:{lat:37.4239163,lng:-122.094},title:`This marker is visible at zoom level 15 and higher.`,minZoom:14},{position:{lat:37.4245,lng:-122.096},title:`This marker is visible at zoom level 16 and higher.`,minZoom:15},{position:{lat:37.4249,lng:-122.095},title:`This marker is visible at zoom level 17 and higher.`,minZoom:16},{position:{lat:37.425,lng:-122.0955},title:`This marker is visible at zoom level 18 and higher.`,minZoom:17}],i=[];for(let{position:t,title:a}of r){let r=new n({position:t,title:a});e.append(r),i.push(r)}e.innerMap.addListener(`zoom_changed`,()=>{let t=e.innerMap.getZoom();for(let e=0;ea?n:null}})}t(); \ No newline at end of file diff --git a/dist/samples/advanced-markers-zoom/dist/index.html b/dist/samples/advanced-markers-zoom/dist/index.html index db31db2ea..f87b20088 100644 --- a/dist/samples/advanced-markers-zoom/dist/index.html +++ b/dist/samples/advanced-markers-zoom/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/advanced-markers-zoom/docs/index.js b/dist/samples/advanced-markers-zoom/docs/index.js index 723a7707c..430a2c090 100644 --- a/dist/samples/advanced-markers-zoom/docs/index.js +++ b/dist/samples/advanced-markers-zoom/docs/index.js @@ -10,8 +10,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markerOptions = [ { diff --git a/dist/samples/advanced-markers-zoom/docs/index.ts b/dist/samples/advanced-markers-zoom/docs/index.ts index 64051170c..8051f5dd9 100644 --- a/dist/samples/advanced-markers-zoom/docs/index.ts +++ b/dist/samples/advanced-markers-zoom/docs/index.ts @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map')!; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markerOptions = [ { diff --git a/dist/samples/advanced-markers-zoom/jsfiddle/demo.js b/dist/samples/advanced-markers-zoom/jsfiddle/demo.js index b15f1225f..da710b45a 100644 --- a/dist/samples/advanced-markers-zoom/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-zoom/jsfiddle/demo.js @@ -9,8 +9,10 @@ const mapElement = document.querySelector('gmp-map'); async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const markerOptions = [ { diff --git a/dist/samples/circle-simple/app/index.ts b/dist/samples/circle-simple/app/index.ts index b73598ddb..1801b1f0a 100644 --- a/dist/samples/circle-simple/app/index.ts +++ b/dist/samples/circle-simple/app/index.ts @@ -10,9 +10,12 @@ let innerMap; async function initMap() { // Request needed libraries. - const { Circle } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { event } = await google.maps.importLibrary('core'); + const [{ Circle }, { AdvancedMarkerElement }, { event }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Get the gmp-map element. const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/circle-simple/dist/assets/index-BWZrCCPm.js b/dist/samples/circle-simple/dist/assets/index-BWZrCCPm.js new file mode 100644 index 000000000..7136d7b79 --- /dev/null +++ b/dist/samples/circle-simple/dist/assets/index-BWZrCCPm.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),document.querySelector(`gmp-map`);async function e(){let[{Circle:e},{AdvancedMarkerElement:t},{event:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`),google.maps.importLibrary(`core`)]),r=document.querySelector(`gmp-map`),i={lat:34.98956821576194,lng:135.74239981260283},a=r.innerMap,o=document.querySelectorAll(`input[name="radius"]`),s=new e({strokeColor:`#ffdd00ff`,strokeOpacity:.8,strokeWeight:2,fillColor:`#ffdd00ff`,fillOpacity:.35,map:a,center:i,radius:400,draggable:!0,editable:!1}),c=new DOMParser().parseFromString(``,`image/svg+xml`).documentElement,l=new t({position:i,title:`A marker using a custom SVG image.`,anchorLeft:`-50%`,anchorTop:`-50%`});l.append(c),r.append(l),n.addListenerOnce(a,`tilesloaded`,function(){let e=document.getElementById(`control-panel`);e&&(e.style.display=`block`)}),o.forEach(e=>{e.addEventListener(`change`,e=>{let t=e.target;s.setRadius(Number(t.value))})}),a.addListener(`click`,e=>{let t=e.latLng;s.setCenter(t),l.position=t,a.panTo(t)}),s.addListener(`center_changed`,()=>{l.position=s.getCenter()})}e(); \ No newline at end of file diff --git a/dist/samples/circle-simple/dist/assets/index-aa7LM471.js b/dist/samples/circle-simple/dist/assets/index-aa7LM471.js deleted file mode 100644 index cd1afb1ae..000000000 --- a/dist/samples/circle-simple/dist/assets/index-aa7LM471.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),document.querySelector(`gmp-map`);async function e(){let{Circle:e}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:t}=await google.maps.importLibrary(`marker`),{event:n}=await google.maps.importLibrary(`core`),r=document.querySelector(`gmp-map`),i={lat:34.98956821576194,lng:135.74239981260283},a=r.innerMap,o=document.querySelectorAll(`input[name="radius"]`),s=new e({strokeColor:`#ffdd00ff`,strokeOpacity:.8,strokeWeight:2,fillColor:`#ffdd00ff`,fillOpacity:.35,map:a,center:i,radius:400,draggable:!0,editable:!1}),c=new DOMParser().parseFromString(``,`image/svg+xml`).documentElement,l=new t({position:i,title:`A marker using a custom SVG image.`,anchorLeft:`-50%`,anchorTop:`-50%`});l.append(c),r.append(l),n.addListenerOnce(a,`tilesloaded`,function(){let e=document.getElementById(`control-panel`);e&&(e.style.display=`block`)}),o.forEach(e=>{e.addEventListener(`change`,e=>{let t=e.target;s.setRadius(Number(t.value))})}),a.addListener(`click`,e=>{let t=e.latLng;s.setCenter(t),l.position=t,a.panTo(t)}),s.addListener(`center_changed`,()=>{l.position=s.getCenter()})}e(); \ No newline at end of file diff --git a/dist/samples/circle-simple/dist/index.html b/dist/samples/circle-simple/dist/index.html index cfd1469d3..12b043ab9 100644 --- a/dist/samples/circle-simple/dist/index.html +++ b/dist/samples/circle-simple/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/circle-simple/docs/index.js b/dist/samples/circle-simple/docs/index.js index 58b812f46..c8987291b 100644 --- a/dist/samples/circle-simple/docs/index.js +++ b/dist/samples/circle-simple/docs/index.js @@ -11,9 +11,12 @@ let innerMap; async function initMap() { // Request needed libraries. - const { Circle } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { event } = await google.maps.importLibrary('core'); + const [{ Circle }, { AdvancedMarkerElement }, { event }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Get the gmp-map element. const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/circle-simple/docs/index.ts b/dist/samples/circle-simple/docs/index.ts index b73598ddb..1801b1f0a 100644 --- a/dist/samples/circle-simple/docs/index.ts +++ b/dist/samples/circle-simple/docs/index.ts @@ -10,9 +10,12 @@ let innerMap; async function initMap() { // Request needed libraries. - const { Circle } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { event } = await google.maps.importLibrary('core'); + const [{ Circle }, { AdvancedMarkerElement }, { event }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Get the gmp-map element. const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/circle-simple/jsfiddle/demo.js b/dist/samples/circle-simple/jsfiddle/demo.js index 2de78d686..2ace9c58d 100644 --- a/dist/samples/circle-simple/jsfiddle/demo.js +++ b/dist/samples/circle-simple/jsfiddle/demo.js @@ -10,9 +10,12 @@ let innerMap; async function initMap() { // Request needed libraries. - const { Circle } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { event } = await google.maps.importLibrary('core'); + const [{ Circle }, { AdvancedMarkerElement }, { event }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Get the gmp-map element. const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/control-options/app/index.ts b/dist/samples/control-options/app/index.ts index f31f6680e..03b2a88e9 100755 --- a/dist/samples/control-options/app/index.ts +++ b/dist/samples/control-options/app/index.ts @@ -10,9 +10,11 @@ async function initMap() { // Request the needed libraries. - const { MapTypeControlStyle, MapTypeId } = - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle, MapTypeId }, { ControlPosition }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/event-click-latlng/dist/assets/index-CyqixEtH.js b/dist/samples/control-options/dist/assets/index-BaW35f3G.js similarity index 65% rename from dist/samples/event-click-latlng/dist/assets/index-CyqixEtH.js rename to dist/samples/control-options/dist/assets/index-BaW35f3G.js index 1f7442591..fb44cc382 100644 --- a/dist/samples/event-click-latlng/dist/assets/index-CyqixEtH.js +++ b/dist/samples/control-options/dist/assets/index-BaW35f3G.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){await google.maps.importLibrary(`maps`);let{InfoWindow:e}=await google.maps.importLibrary(`maps`),t=document.querySelector(`gmp-map`).innerMap,n=new e({content:`Click the map to get Lat/Lng!`,position:t.getCenter()});n.open(t),t.addListener(`click`,r=>{n.close(),n=new e({position:r.latLng}),n.setContent(JSON.stringify(r.latLng.toJSON(),null,2)),n.open(t)})}e(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{MapTypeControlStyle:e,MapTypeId:t},{ControlPosition:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);document.querySelector(`gmp-map`).innerMap.setOptions({mapTypeControl:!0,mapTypeControlOptions:{style:e.DROPDOWN_MENU,mapTypeIds:[t.ROADMAP,t.TERRAIN],position:n.TOP_CENTER}})}e(); \ No newline at end of file diff --git a/dist/samples/control-options/dist/index.html b/dist/samples/control-options/dist/index.html index 169af0e7c..311b5ce9e 100644 --- a/dist/samples/control-options/dist/index.html +++ b/dist/samples/control-options/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/control-options/docs/index.js b/dist/samples/control-options/docs/index.js index a8efacd27..80465ba56 100644 --- a/dist/samples/control-options/docs/index.js +++ b/dist/samples/control-options/docs/index.js @@ -11,9 +11,11 @@ async function initMap() { // Request the needed libraries. - const { MapTypeControlStyle, MapTypeId } = - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle, MapTypeId }, { ControlPosition }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/control-options/docs/index.ts b/dist/samples/control-options/docs/index.ts index f31f6680e..03b2a88e9 100755 --- a/dist/samples/control-options/docs/index.ts +++ b/dist/samples/control-options/docs/index.ts @@ -10,9 +10,11 @@ async function initMap() { // Request the needed libraries. - const { MapTypeControlStyle, MapTypeId } = - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle, MapTypeId }, { ControlPosition }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/control-options/jsfiddle/demo.js b/dist/samples/control-options/jsfiddle/demo.js index 14f0711b8..e74afb1ab 100644 --- a/dist/samples/control-options/jsfiddle/demo.js +++ b/dist/samples/control-options/jsfiddle/demo.js @@ -10,9 +10,11 @@ async function initMap() { // Request the needed libraries. - const { MapTypeControlStyle, MapTypeId } = - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle, MapTypeId }, { ControlPosition }] = + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/control-positioning-labels/app/index.ts b/dist/samples/control-positioning-labels/app/index.ts index 592f2e672..6c60097b5 100644 --- a/dist/samples/control-positioning-labels/app/index.ts +++ b/dist/samples/control-positioning-labels/app/index.ts @@ -35,8 +35,10 @@ async function MakeControl(controlDiv: HTMLElement, label: string) { async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/control-positioning-labels/dist/assets/index-C9oAPUJL.js b/dist/samples/control-positioning-labels/dist/assets/index-Cdoc-1N3.js similarity index 58% rename from dist/samples/control-positioning-labels/dist/assets/index-C9oAPUJL.js rename to dist/samples/control-positioning-labels/dist/assets/index-Cdoc-1N3.js index 67e6f2334..b28df7314 100644 --- a/dist/samples/control-positioning-labels/dist/assets/index-C9oAPUJL.js +++ b/dist/samples/control-positioning-labels/dist/assets/index-Cdoc-1N3.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(e,t){let n=document.createElement(`div`);n.style.backgroundColor=`#fff`,n.style.padding=`3px`,n.style.cursor=`pointer`,n.style.textAlign=`center`,n.title=`Click to toggle RTL/LTR`,n.className=`controlUI`,e.appendChild(n);let r=document.createElement(`div`);r.style.fontSize=`12px`,r.innerHTML=t,r.className=`controlText`,n.appendChild(r)}async function t(){await google.maps.importLibrary(`maps`);let{ControlPosition:t}=await google.maps.importLibrary(`core`),r=document.querySelector(`gmp-map`).innerMap;[`BLOCK_START_INLINE_START`,`INLINE_START_BLOCK_START`,`BLOCK_START_INLINE_CENTER`,`BLOCK_START_INLINE_END`,`INLINE_END_BLOCK_START`,`INLINE_START_BLOCK_CENTER`,`INLINE_END_BLOCK_CENTER`,`BLOCK_END_INLINE_START`,`INLINE_START_BLOCK_END`,`BLOCK_END_INLINE_CENTER`,`BLOCK_END_INLINE_END`,`INLINE_END_BLOCK_END`].forEach(i=>{let a=document.createElement(`div`),o=t[i];e(a,i),a.addEventListener(`click`,n),r.controls[o].push(a)})}async function n(){let e=document.documentElement;e.dir===`rtl`?e.dir=`ltr`:e.dir=`rtl`}t(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(e,t){let n=document.createElement(`div`);n.style.backgroundColor=`#fff`,n.style.padding=`3px`,n.style.cursor=`pointer`,n.style.textAlign=`center`,n.title=`Click to toggle RTL/LTR`,n.className=`controlUI`,e.appendChild(n);let r=document.createElement(`div`);r.style.fontSize=`12px`,r.innerHTML=t,r.className=`controlText`,n.appendChild(r)}async function t(){let[,{ControlPosition:t}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]),r=document.querySelector(`gmp-map`).innerMap;[`BLOCK_START_INLINE_START`,`INLINE_START_BLOCK_START`,`BLOCK_START_INLINE_CENTER`,`BLOCK_START_INLINE_END`,`INLINE_END_BLOCK_START`,`INLINE_START_BLOCK_CENTER`,`INLINE_END_BLOCK_CENTER`,`BLOCK_END_INLINE_START`,`INLINE_START_BLOCK_END`,`BLOCK_END_INLINE_CENTER`,`BLOCK_END_INLINE_END`,`INLINE_END_BLOCK_END`].forEach(i=>{let a=document.createElement(`div`),o=t[i];e(a,i),a.addEventListener(`click`,n),r.controls[o].push(a)})}async function n(){let e=document.documentElement;e.dir===`rtl`?e.dir=`ltr`:e.dir=`rtl`}t(); \ No newline at end of file diff --git a/dist/samples/control-positioning-labels/dist/index.html b/dist/samples/control-positioning-labels/dist/index.html index 8b3dc8b49..800a5bbf2 100644 --- a/dist/samples/control-positioning-labels/dist/index.html +++ b/dist/samples/control-positioning-labels/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/control-positioning-labels/docs/index.js b/dist/samples/control-positioning-labels/docs/index.js index bc687502b..bbf90454a 100644 --- a/dist/samples/control-positioning-labels/docs/index.js +++ b/dist/samples/control-positioning-labels/docs/index.js @@ -36,8 +36,10 @@ async function MakeControl(controlDiv, label) { async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/control-positioning-labels/docs/index.ts b/dist/samples/control-positioning-labels/docs/index.ts index 592f2e672..6c60097b5 100644 --- a/dist/samples/control-positioning-labels/docs/index.ts +++ b/dist/samples/control-positioning-labels/docs/index.ts @@ -35,8 +35,10 @@ async function MakeControl(controlDiv: HTMLElement, label: string) { async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/control-positioning-labels/jsfiddle/demo.js b/dist/samples/control-positioning-labels/jsfiddle/demo.js index 0d81aa750..91d90a411 100644 --- a/dist/samples/control-positioning-labels/jsfiddle/demo.js +++ b/dist/samples/control-positioning-labels/jsfiddle/demo.js @@ -36,8 +36,10 @@ async function MakeControl(controlDiv, label) { async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/control-positioning/app/index.ts b/dist/samples/control-positioning/app/index.ts index 92b03ca7e..d5e74a291 100755 --- a/dist/samples/control-positioning/app/index.ts +++ b/dist/samples/control-positioning/app/index.ts @@ -10,8 +10,10 @@ let innerMap; async function initMap() { // Request needed libraries. - const { MapTypeControlStyle } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. const innerMap = mapElement.innerMap; diff --git a/dist/samples/control-positioning/dist/assets/index-Byl-blVr.js b/dist/samples/control-positioning/dist/assets/index-Byl-blVr.js deleted file mode 100644 index 19531c530..000000000 --- a/dist/samples/control-positioning/dist/assets/index-Byl-blVr.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let{MapTypeControlStyle:t}=await google.maps.importLibrary(`maps`),{ControlPosition:n}=await google.maps.importLibrary(`core`);e.innerMap.setOptions({mapTypeControl:!0,mapTypeControlOptions:{style:t.HORIZONTAL_BAR,position:n.BLOCK_START_INLINE_CENTER},zoomControl:!0,zoomControlOptions:{position:n.INLINE_START_BLOCK_CENTER},scaleControl:!0,streetViewControl:!0,streetViewControlOptions:{position:n.INLINE_START_BLOCK_START},fullscreenControl:!0})}t(); \ No newline at end of file diff --git a/dist/samples/control-positioning/dist/assets/index-Dk37I9CC.js b/dist/samples/control-positioning/dist/assets/index-Dk37I9CC.js new file mode 100644 index 000000000..c5bae5265 --- /dev/null +++ b/dist/samples/control-positioning/dist/assets/index-Dk37I9CC.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`);async function t(){let[{MapTypeControlStyle:t},{ControlPosition:n}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);e.innerMap.setOptions({mapTypeControl:!0,mapTypeControlOptions:{style:t.HORIZONTAL_BAR,position:n.BLOCK_START_INLINE_CENTER},zoomControl:!0,zoomControlOptions:{position:n.INLINE_START_BLOCK_CENTER},scaleControl:!0,streetViewControl:!0,streetViewControlOptions:{position:n.INLINE_START_BLOCK_START},fullscreenControl:!0})}t(); \ No newline at end of file diff --git a/dist/samples/control-positioning/dist/index.html b/dist/samples/control-positioning/dist/index.html index 532d4b287..9c6cc8a70 100644 --- a/dist/samples/control-positioning/dist/index.html +++ b/dist/samples/control-positioning/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/control-positioning/docs/index.js b/dist/samples/control-positioning/docs/index.js index 1c9380996..e21c4dd90 100644 --- a/dist/samples/control-positioning/docs/index.js +++ b/dist/samples/control-positioning/docs/index.js @@ -11,8 +11,10 @@ let innerMap; async function initMap() { // Request needed libraries. - const { MapTypeControlStyle } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. const innerMap = mapElement.innerMap; diff --git a/dist/samples/control-positioning/docs/index.ts b/dist/samples/control-positioning/docs/index.ts index 92b03ca7e..d5e74a291 100755 --- a/dist/samples/control-positioning/docs/index.ts +++ b/dist/samples/control-positioning/docs/index.ts @@ -10,8 +10,10 @@ let innerMap; async function initMap() { // Request needed libraries. - const { MapTypeControlStyle } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. const innerMap = mapElement.innerMap; diff --git a/dist/samples/control-positioning/jsfiddle/demo.js b/dist/samples/control-positioning/jsfiddle/demo.js index 1094644d3..ff9230ba0 100644 --- a/dist/samples/control-positioning/jsfiddle/demo.js +++ b/dist/samples/control-positioning/jsfiddle/demo.js @@ -10,8 +10,10 @@ let innerMap; async function initMap() { // Request needed libraries. - const { MapTypeControlStyle } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ MapTypeControlStyle }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. const innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-datasets-point/app/index.ts b/dist/samples/dds-datasets-point/app/index.ts index eb50b5c60..740594467 100644 --- a/dist/samples/dds-datasets-point/app/index.ts +++ b/dist/samples/dds-datasets-point/app/index.ts @@ -86,8 +86,10 @@ function setStyle(params) { async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-datasets-point/dist/assets/index-ve4VCRfq.js b/dist/samples/dds-datasets-point/dist/assets/index-CYhsYffC.js similarity index 55% rename from dist/samples/dds-datasets-point/dist/assets/index-ve4VCRfq.js rename to dist/samples/dds-datasets-point/dist/assets/index-CYhsYffC.js index 39a172796..e643e0a87 100644 --- a/dist/samples/dds-datasets-point/dist/assets/index-ve4VCRfq.js +++ b/dist/samples/dds-datasets-point/dist/assets/index-CYhsYffC.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;function n(e){switch(e.feature.datasetAttributes.CombinationofPrimaryandHighlightColor){case`Black+`:return{fillColor:`black`,pointRadius:8};case`Cinnamon+`:return{fillColor:`#8b0000`,pointRadius:8};case`Cinnamon+Gray`:return{fillColor:`#8b0000`,strokeColor:`gray`,pointRadius:6};case`Cinnamon+White`:return{fillColor:`#8b0000`,strokeColor:`white`,pointRadius:6};case`Gray+`:return{fillColor:`gray`,pointRadius:8};case`Gray+Cinnamon`:return{fillColor:`gray`,strokeColor:`#8b0000`,pointRadius:6};case`Gray+Cinnamon, White`:return{fillColor:`silver`,strokeColor:`#8b0000`,pointRadius:6};case`Gray+White`:return{fillColor:`gray`,strokeColor:`white`,pointRadius:6};default:return{fillColor:`yellow`,pointRadius:8}}}async function r(){await google.maps.importLibrary(`maps`);let{event:r}=await google.maps.importLibrary(`core`);t=e.innerMap,r.addListenerOnce(t,`idle`,()=>{i(t)});let a=t.getDatasetFeatureLayer(`a99635b0-5e73-4b2a-8ae3-cb40f4b7f47e`);a.style=n}async function i(e){let t={black:[`black`],cinnamon:[`#8b0000`],"cinnamon + gray":[`#8b0000`,`gray`],"cinnamon + white":[`#8b0000`,`white`],gray:[`gray`],"gray + cinnamon":[`gray`,`#8b0000`],"gray + cinnamon + white":[`silver`,`#8b0000`],"gray + white":[`gray`,`white`],"no color data":[`yellow`]},n=document.getElementById(`legend`);n.id=`legend`;let r=document.createElement(`div`);r.innerText=`Fur Colors`,r.classList.add(`title`),n.appendChild(r);let i;for(i in t){let e=document.createElement(`div`);e.id=`container`;let r=document.createElement(`div`);r.style.backgroundColor=t[i][0],t[i][1]?r.style.borderColor=t[i][1]:r.style.borderColor=t[i][0],r.classList.add(`box`);let a=document.createElement(`div`);a.classList.add(`legend`),a.innerText=i,e.appendChild(r),e.appendChild(a),n.appendChild(e)}}r(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;function n(e){switch(e.feature.datasetAttributes.CombinationofPrimaryandHighlightColor){case`Black+`:return{fillColor:`black`,pointRadius:8};case`Cinnamon+`:return{fillColor:`#8b0000`,pointRadius:8};case`Cinnamon+Gray`:return{fillColor:`#8b0000`,strokeColor:`gray`,pointRadius:6};case`Cinnamon+White`:return{fillColor:`#8b0000`,strokeColor:`white`,pointRadius:6};case`Gray+`:return{fillColor:`gray`,pointRadius:8};case`Gray+Cinnamon`:return{fillColor:`gray`,strokeColor:`#8b0000`,pointRadius:6};case`Gray+Cinnamon, White`:return{fillColor:`silver`,strokeColor:`#8b0000`,pointRadius:6};case`Gray+White`:return{fillColor:`gray`,strokeColor:`white`,pointRadius:6};default:return{fillColor:`yellow`,pointRadius:8}}}async function r(){let[,{event:r}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);t=e.innerMap,r.addListenerOnce(t,`idle`,()=>{i(t)});let a=t.getDatasetFeatureLayer(`a99635b0-5e73-4b2a-8ae3-cb40f4b7f47e`);a.style=n}async function i(e){let t={black:[`black`],cinnamon:[`#8b0000`],"cinnamon + gray":[`#8b0000`,`gray`],"cinnamon + white":[`#8b0000`,`white`],gray:[`gray`],"gray + cinnamon":[`gray`,`#8b0000`],"gray + cinnamon + white":[`silver`,`#8b0000`],"gray + white":[`gray`,`white`],"no color data":[`yellow`]},n=document.getElementById(`legend`);n.id=`legend`;let r=document.createElement(`div`);r.innerText=`Fur Colors`,r.classList.add(`title`),n.appendChild(r);let i;for(i in t){let e=document.createElement(`div`);e.id=`container`;let r=document.createElement(`div`);r.style.backgroundColor=t[i][0],t[i][1]?r.style.borderColor=t[i][1]:r.style.borderColor=t[i][0],r.classList.add(`box`);let a=document.createElement(`div`);a.classList.add(`legend`),a.innerText=i,e.appendChild(r),e.appendChild(a),n.appendChild(e)}}r(); \ No newline at end of file diff --git a/dist/samples/dds-datasets-point/dist/index.html b/dist/samples/dds-datasets-point/dist/index.html index 2200839c5..1dd0bf5b8 100644 --- a/dist/samples/dds-datasets-point/dist/index.html +++ b/dist/samples/dds-datasets-point/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/dds-datasets-point/docs/index.js b/dist/samples/dds-datasets-point/docs/index.js index 86b018905..d332daee7 100644 --- a/dist/samples/dds-datasets-point/docs/index.js +++ b/dist/samples/dds-datasets-point/docs/index.js @@ -87,8 +87,10 @@ function setStyle(params) { async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-datasets-point/docs/index.ts b/dist/samples/dds-datasets-point/docs/index.ts index eb50b5c60..740594467 100644 --- a/dist/samples/dds-datasets-point/docs/index.ts +++ b/dist/samples/dds-datasets-point/docs/index.ts @@ -86,8 +86,10 @@ function setStyle(params) { async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-datasets-point/jsfiddle/demo.js b/dist/samples/dds-datasets-point/jsfiddle/demo.js index 5121d4b6b..6253988c5 100644 --- a/dist/samples/dds-datasets-point/jsfiddle/demo.js +++ b/dist/samples/dds-datasets-point/jsfiddle/demo.js @@ -83,8 +83,10 @@ function setStyle(params) { async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-region-viewer/app/index.ts b/dist/samples/dds-region-viewer/app/index.ts index bcba5a518..caf8730d5 100644 --- a/dist/samples/dds-region-viewer/app/index.ts +++ b/dist/samples/dds-region-viewer/app/index.ts @@ -34,9 +34,11 @@ let selectedPlaceId: string; import * as countries from './src/countries.json'; async function initMap() { - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); - await google.maps.importLibrary('marker'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-region-viewer/dist/assets/index-DE4aOIAE.js b/dist/samples/dds-region-viewer/dist/assets/index-DqRIGJjb.js similarity index 91% rename from dist/samples/dds-region-viewer/dist/assets/index-DE4aOIAE.js rename to dist/samples/dds-region-viewer/dist/assets/index-DqRIGJjb.js index f8a8bfa35..d62d551ce 100644 --- a/dist/samples/dds-region-viewer/dist/assets/index-DE4aOIAE.js +++ b/dist/samples/dds-region-viewer/dist/assets/index-DqRIGJjb.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=JSON.parse(`[{"name":"Afghanistan","code":"AF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Åland Islands","code":"AX","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Albania","code":"AL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Algeria","code":"DZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"American Samoa","code":"AS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Andorra","code":"AD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Angola","code":"AO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Anguilla","code":"AI","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Antarctica","code":"AQ","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Antigua & Barbuda","code":"AG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Argentina","code":"AR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Armenia","code":"AM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Aruba","code":"AW","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Australia","code":"AU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Austria","code":"AT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Azerbaijan","code":"AZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bahamas","code":"BS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bahrain","code":"BH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bangladesh","code":"BD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Barbados","code":"BB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Belarus","code":"BY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Belgium","code":"BE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Belize","code":"BZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Benin","code":"BJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bermuda","code":"BM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bhutan","code":"BT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bolivia","code":"BO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bosnia & Herzegovina","code":"BA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Botswana","code":"BW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bouvet Island","code":"BV","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Brazil","code":"BR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"British Indian Ocean Territory","code":"IO","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"British Virgin Islands","code":"VG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Brunei","code":"BN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bulgaria","code":"BG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Burkina Faso","code":"BF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Burundi","code":"BI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cambodia","code":"KH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cameroon","code":"CM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Canada","code":"CA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Canary Islands","code":"IC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cape Verde","code":"CV","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Caribbean Netherlands","code":"BQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cayman Islands","code":"KY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Central African Republic","code":"CF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Chad","code":"TD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Chile","code":"CL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"China","code":"CN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Christmas Island","code":"CX","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Cocos (Keeling) Islands","code":"CC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Colombia","code":"CO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Comoros","code":"KM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Congo - Brazzaville","code":"CG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Congo - Kinshasa","code":"CD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cook Islands","code":"CK","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Costa Rica","code":"CR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Côte d’Ivoire","code":"CI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Croatia","code":"HR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cuba","code":"CU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Curaçao","code":"CW","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cyprus","code":"CY","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Czechia","code":"CZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Denmark","code":"DK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Djibouti","code":"DJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Dominica","code":"DM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Dominican Republic","code":"DO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ecuador","code":"EC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Egypt","code":"EG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"El Salvador","code":"SV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Equatorial Guinea","code":"GQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Eritrea","code":"ER","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Estonia","code":"EE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Eswatini","code":"SZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ethiopia","code":"ET","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Falkland Islands (Islas Malvinas)","code":"FK","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Faroe Islands","code":"FO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Fiji","code":"FJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Finland","code":"FI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"France","code":"FR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"French Guiana","code":"GF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"French Polynesia","code":"PF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"French Southern Territories","code":"TF","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Gabon","code":"GA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Gambia","code":"GM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Georgia","code":"GE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Germany","code":"DE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Ghana","code":"GH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Gibraltar","code":"GI","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Greece","code":"GR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Greenland","code":"GL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Grenada","code":"GD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guadeloupe","code":"GP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guam","code":"GU","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guatemala","code":"GT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guernsey","code":"GG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guinea","code":"GN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guinea-Bissau","code":"GW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guyana","code":"GY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Haiti","code":"HT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Heard & McDonald Islands","code":"HM","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Honduras","code":"HN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Hong Kong","code":"HK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Hungary","code":"HU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Iceland","code":"IS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"India","code":"IN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Indonesia","code":"ID","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Iran","code":"IR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Iraq","code":"IQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ireland","code":"IE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Isle of Man","code":"IM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Israel","code":"IL","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Italy","code":"IT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Jamaica","code":"JM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Japan","code":"JP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Jersey","code":"JE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Jordan","code":"JO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kazakhstan","code":"KZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kenya","code":"KE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kiribati","code":"KI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kosovo","code":"XK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kuwait","code":"KW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kyrgyzstan","code":"KG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Laos","code":"LA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Latvia","code":"LV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Lebanon","code":"LB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Lesotho","code":"LS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Liberia","code":"LR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Libya","code":"LY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Liechtenstein","code":"LI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Lithuania","code":"LT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Luxembourg","code":"LU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":true,"school_district":false}},{"name":"Macao","code":"MO","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Madagascar","code":"MG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Malawi","code":"MW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Malaysia","code":"MY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Maldives","code":"MV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mali","code":"ML","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Malta","code":"MT","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":true,"school_district":false}},{"name":"Marshall Islands","code":"MH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Martinique","code":"MQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mauritania","code":"MR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mauritius","code":"MU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mayotte","code":"YT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mexico","code":"MX","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Micronesia","code":"FM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Moldova","code":"MD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Monaco","code":"MC","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mongolia","code":"MN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Montenegro","code":"ME","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Montserrat","code":"MS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Morocco","code":"MA","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mozambique","code":"MZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Myanmar (Burma)","code":"MM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Namibia","code":"NA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Nauru","code":"NR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Nepal","code":"NP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Netherlands","code":"NL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"New Caledonia","code":"NC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"New Zealand","code":"NZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Nicaragua","code":"NI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Niger","code":"NE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Nigeria","code":"NG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Niue","code":"NU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Norfolk Island","code":"NF","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"North Korea","code":"KP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"North Macedonia","code":"MK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Northern Mariana Islands","code":"MP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Norway","code":"NO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Oman","code":"OM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Pakistan","code":"PK","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Palau","code":"PW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Palestine","code":"PS","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Panama","code":"PA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Papua New Guinea","code":"PG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Paraguay","code":"PY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Peru","code":"PE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Philippines","code":"PH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Pitcairn Islands","code":"PN","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Poland","code":"PL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Portugal","code":"PT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Puerto Rico","code":"PR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Qatar","code":"QA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Réunion","code":"RE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Romania","code":"RO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Russia","code":"RU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Rwanda","code":"RW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Samoa","code":"WS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"San Marino","code":"SM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"São Tomé & Príncipe","code":"ST","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Saudi Arabia","code":"SA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Senegal","code":"SN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Serbia","code":"RS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Seychelles","code":"SC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sierra Leone","code":"SL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Singapore","code":"SG","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sint Maarten","code":"SX","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Slovakia","code":"SK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Slovenia","code":"SI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Solomon Islands","code":"SB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Somalia","code":"SO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"South Africa","code":"ZA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"South Georgia & South Sandwich Islands","code":"GS","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"South Korea","code":"KR","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"South Sudan","code":"SS","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Spain","code":"ES","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Sri Lanka","code":"LK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Barthélemy","code":"BL","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Helena","code":"SH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Kitts & Nevis","code":"KN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Lucia","code":"LC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Martin","code":"MF","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"St. Pierre & Miquelon","code":"PM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"St. Vincent & Grenadines","code":"VC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sudan","code":"SD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Suriname","code":"SR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Svalbard & Jan Mayen","code":"SJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sweden","code":"SE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Switzerland","code":"CH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Syria","code":"SY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Taiwan","code":"TW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tajikistan","code":"TJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tanzania","code":"TZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Thailand","code":"TH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":true,"school_district":false}},{"name":"Timor-Leste","code":"TL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Togo","code":"TG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tokelau","code":"TK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tonga","code":"TO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Trinidad & Tobago","code":"TT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tunisia","code":"TN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Türkiye","code":"TR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Turkmenistan","code":"TM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Turks & Caicos Islands","code":"TC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Tuvalu","code":"TV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"U.S. Outlying Islands","code":"UM","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"U.S. Virgin Islands","code":"VI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Uganda","code":"UG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ukraine","code":"UA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"United Arab Emirates","code":"AE","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"United Kingdom","code":"GB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"United States","code":"US","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":true}},{"name":"Uruguay","code":"UY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Uzbekistan","code":"UZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Vanuatu","code":"VU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Vatican City","code":"VA","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Venezuela","code":"VE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Vietnam","code":"VN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Wallis & Futuna","code":"WF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Yemen","code":"YE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Zambia","code":"ZM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Zimbabwe","code":"ZW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}}]`),t=document.querySelector(`gmp-map`),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;async function v(){await google.maps.importLibrary(`maps`),await google.maps.importLibrary(`places`),await google.maps.importLibrary(`marker`),r=t.innerMap,r.setOptions({mapTypeControl:!1}),n=document.querySelector(`gmp-place-autocomplete`),n.includedPrimaryTypes=[`(regions)`],l=document.getElementById(`pac-content`),o=document.getElementById(`pac-filter-option`),i=document.getElementById(`country-select`),a=document.getElementById(`feature-type-select`),s=document.getElementById(`fill-color-picker`),c=document.getElementById(`stroke-color-picker`),i.addEventListener(`change`,w),a.addEventListener(`change`,y),s.addEventListener(`change`,x),c.addEventListener(`change`,x),o.addEventListener(`change`,()=>{o.checked?(a.item(5).disabled=!0,b()):(a.item(5).disabled=!1,b())}),n.addEventListener(`gmp-select`,async({placePrediction:e})=>{let t=e.types,n=[`country`,`administrative_area_level_1`,`administrative_area_level_2`,`locality`,`postal_code`,`school_district`];for(let e of t)if(n.includes(e)){a.value=e;break}b(),A(e.placeId,1)}),d=r.getFeatureLayer(`COUNTRY`),f=r.getFeatureLayer(`ADMINISTRATIVE_AREA_LEVEL_1`),p=r.getFeatureLayer(`ADMINISTRATIVE_AREA_LEVEL_2`),m=r.getFeatureLayer(`LOCALITY`),h=r.getFeatureLayer(`POSTAL_CODE`),g=r.getFeatureLayer(`SCHOOL_DISTRICT`),d.addListener(`click`,O),f.addListener(`click`,O),p.addListener(`click`,O),m.addListener(`click`,O),h.addListener(`click`,O),g.addListener(`click`,O),u=[d,f,p,m,h,g],S(),C(),w(),a.selectedIndex=0}function y(){let e={fillColor:`white`,fillOpacity:.01,strokeColor:c.value,strokeOpacity:1,strokeWeight:2};switch(D(),b(),_=``,l.innerHTML=``,a.value){case`country`:d.style=e,o.disabled=!1;break;case`administrative_area_level_1`:f.style=e,o.disabled=!1;break;case`administrative_area_level_2`:p.style=e,o.disabled=!1;break;case`locality`:m.style=e,o.disabled=!1;break;case`postal_code`:h.style=e,o.disabled=!1;break;case`school_district`:g.style=e,o.disabled=!0;break;default:break}}function b(){o.checked?n.includedPrimaryTypes=[a.value]:n.includedPrimaryTypes=[`(regions)`]}function x(){_&&S(_)}function S(e){let t={strokeColor:c.value,strokeOpacity:1,strokeWeight:2,fillColor:`white`,fillOpacity:.1},n={strokeColor:c.value,strokeOpacity:1,strokeWeight:2,fillColor:s.value,fillOpacity:.5};D();let r=r=>r.feature.placeId==e?n:t;switch(a.value){case`country`:d.style=r,o.disabled=!1;break;case`administrative_area_level_1`:f.style=r,o.disabled=!1;break;case`administrative_area_level_2`:p.style=r,o.disabled=!1;break;case`locality`:m.style=r,o.disabled=!1;break;case`postal_code`:h.style=r,o.disabled=!1;break;case`school_district`:g.style=r,o.disabled=!0;break;default:break}}function C(){for(let t of e){let e=document.createElement(`option`);e.textContent=t.name,e.value=t.code,t.code==`US`&&(e.selected=!0),i.appendChild(e)}}function w(){let e=i.value;T(e),a.namedItem(`country`).selected=!0,k(i.options[i.selectedIndex].text)}function T(e){let t=E(e);for(let[e,n]of t){let t=a.namedItem(e);t&&(t.disabled=!n)}}function E(t){let n=e.find(e=>e.code===t);return new Map([[`country`,n?.feature.country],[`administrative_area_level_1`,n?.feature.administrative_area_level_1],[`administrative_area_level_2`,n?.feature.administrative_area_level_2],[`postal_code`,n?.feature.postal_code],[`locality`,n?.feature.locality],[`school_district`,n?.feature.school_district]])}function D(){for(let e of u)e.style=null}function O(e){let t=e.features[0].placeId;t&&A(t,0)}async function k(e){let{Place:t}=await google.maps.importLibrary(`places`);l.textContent=``;let n={textQuery:e,fields:[`id`]},{places:r}=await t.searchByText(n);r.length>0&&A(r[0].id,0)}async function A(e,t){let n,{Place:o}=await google.maps.importLibrary(`places`);_=e,l.textContent=``;let s=new o({id:e});await s.fetchFields({fields:[`displayName`,`formattedAddress`,`viewport`,`types`,`addressComponents`]});let c=s.addressComponents?.find(e=>e.types.includes(`country`));c&&(i.value=c.shortText,T(i.value),n=E(i.value).get(a.value));let u=s.viewport;r.fitBounds(u,155),l.appendChild(document.createElement(`hr`));let d=s.types,f=document.createElement(`div`);if(f.id=`place-info`,t==0){let t=document.createElement(`b`);t.textContent=s.formattedAddress;let n=document.createElement(`code`);n.textContent=e;let r=document.createElement(`code`);r.textContent=d[0],f.append(t),f.append(document.createElement(`br`),`Place ID: `,n),f.append(document.createElement(`br`),`Feature type: `,r)}else n?f.textContent=`Click a boundary to see its place ID and feature type.`:f.textContent=`Feature type (${a.value}) is not supported for this country.`;l.appendChild(f),S(e)}v(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=JSON.parse(`[{"name":"Afghanistan","code":"AF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Åland Islands","code":"AX","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Albania","code":"AL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Algeria","code":"DZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"American Samoa","code":"AS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Andorra","code":"AD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Angola","code":"AO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Anguilla","code":"AI","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Antarctica","code":"AQ","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Antigua & Barbuda","code":"AG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Argentina","code":"AR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Armenia","code":"AM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Aruba","code":"AW","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Australia","code":"AU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Austria","code":"AT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Azerbaijan","code":"AZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bahamas","code":"BS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bahrain","code":"BH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bangladesh","code":"BD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Barbados","code":"BB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Belarus","code":"BY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Belgium","code":"BE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Belize","code":"BZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Benin","code":"BJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bermuda","code":"BM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bhutan","code":"BT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bolivia","code":"BO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bosnia & Herzegovina","code":"BA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Botswana","code":"BW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bouvet Island","code":"BV","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Brazil","code":"BR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"British Indian Ocean Territory","code":"IO","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"British Virgin Islands","code":"VG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Brunei","code":"BN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Bulgaria","code":"BG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Burkina Faso","code":"BF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Burundi","code":"BI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cambodia","code":"KH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cameroon","code":"CM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Canada","code":"CA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Canary Islands","code":"IC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cape Verde","code":"CV","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Caribbean Netherlands","code":"BQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cayman Islands","code":"KY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Central African Republic","code":"CF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Chad","code":"TD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Chile","code":"CL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"China","code":"CN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Christmas Island","code":"CX","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Cocos (Keeling) Islands","code":"CC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Colombia","code":"CO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Comoros","code":"KM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Congo - Brazzaville","code":"CG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Congo - Kinshasa","code":"CD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cook Islands","code":"CK","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Costa Rica","code":"CR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Côte d’Ivoire","code":"CI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Croatia","code":"HR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cuba","code":"CU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Curaçao","code":"CW","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Cyprus","code":"CY","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Czechia","code":"CZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Denmark","code":"DK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Djibouti","code":"DJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Dominica","code":"DM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Dominican Republic","code":"DO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ecuador","code":"EC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Egypt","code":"EG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"El Salvador","code":"SV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Equatorial Guinea","code":"GQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Eritrea","code":"ER","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Estonia","code":"EE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Eswatini","code":"SZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ethiopia","code":"ET","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Falkland Islands (Islas Malvinas)","code":"FK","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Faroe Islands","code":"FO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Fiji","code":"FJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Finland","code":"FI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"France","code":"FR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"French Guiana","code":"GF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"French Polynesia","code":"PF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"French Southern Territories","code":"TF","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Gabon","code":"GA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Gambia","code":"GM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Georgia","code":"GE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Germany","code":"DE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Ghana","code":"GH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Gibraltar","code":"GI","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Greece","code":"GR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Greenland","code":"GL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Grenada","code":"GD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guadeloupe","code":"GP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guam","code":"GU","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guatemala","code":"GT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guernsey","code":"GG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guinea","code":"GN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guinea-Bissau","code":"GW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Guyana","code":"GY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Haiti","code":"HT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Heard & McDonald Islands","code":"HM","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Honduras","code":"HN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Hong Kong","code":"HK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Hungary","code":"HU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Iceland","code":"IS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"India","code":"IN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Indonesia","code":"ID","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Iran","code":"IR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Iraq","code":"IQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ireland","code":"IE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Isle of Man","code":"IM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Israel","code":"IL","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Italy","code":"IT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Jamaica","code":"JM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Japan","code":"JP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Jersey","code":"JE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Jordan","code":"JO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kazakhstan","code":"KZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kenya","code":"KE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kiribati","code":"KI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kosovo","code":"XK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kuwait","code":"KW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Kyrgyzstan","code":"KG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Laos","code":"LA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Latvia","code":"LV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Lebanon","code":"LB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Lesotho","code":"LS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Liberia","code":"LR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Libya","code":"LY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Liechtenstein","code":"LI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Lithuania","code":"LT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Luxembourg","code":"LU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":true,"school_district":false}},{"name":"Macao","code":"MO","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Madagascar","code":"MG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Malawi","code":"MW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Malaysia","code":"MY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Maldives","code":"MV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mali","code":"ML","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Malta","code":"MT","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":true,"school_district":false}},{"name":"Marshall Islands","code":"MH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Martinique","code":"MQ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mauritania","code":"MR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mauritius","code":"MU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mayotte","code":"YT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mexico","code":"MX","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Micronesia","code":"FM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Moldova","code":"MD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Monaco","code":"MC","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mongolia","code":"MN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Montenegro","code":"ME","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Montserrat","code":"MS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Morocco","code":"MA","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Mozambique","code":"MZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Myanmar (Burma)","code":"MM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Namibia","code":"NA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Nauru","code":"NR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Nepal","code":"NP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Netherlands","code":"NL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"New Caledonia","code":"NC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"New Zealand","code":"NZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"Nicaragua","code":"NI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Niger","code":"NE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Nigeria","code":"NG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Niue","code":"NU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Norfolk Island","code":"NF","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"North Korea","code":"KP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"North Macedonia","code":"MK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Northern Mariana Islands","code":"MP","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Norway","code":"NO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Oman","code":"OM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Pakistan","code":"PK","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Palau","code":"PW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Palestine","code":"PS","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Panama","code":"PA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Papua New Guinea","code":"PG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Paraguay","code":"PY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Peru","code":"PE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Philippines","code":"PH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Pitcairn Islands","code":"PN","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Poland","code":"PL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Portugal","code":"PT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Puerto Rico","code":"PR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Qatar","code":"QA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Réunion","code":"RE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Romania","code":"RO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Russia","code":"RU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Rwanda","code":"RW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Samoa","code":"WS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"San Marino","code":"SM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"São Tomé & Príncipe","code":"ST","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Saudi Arabia","code":"SA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Senegal","code":"SN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Serbia","code":"RS","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Seychelles","code":"SC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sierra Leone","code":"SL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Singapore","code":"SG","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sint Maarten","code":"SX","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Slovakia","code":"SK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Slovenia","code":"SI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":false}},{"name":"Solomon Islands","code":"SB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Somalia","code":"SO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"South Africa","code":"ZA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"South Georgia & South Sandwich Islands","code":"GS","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"South Korea","code":"KR","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"South Sudan","code":"SS","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Spain","code":"ES","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Sri Lanka","code":"LK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Barthélemy","code":"BL","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Helena","code":"SH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Kitts & Nevis","code":"KN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Lucia","code":"LC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"St. Martin","code":"MF","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"St. Pierre & Miquelon","code":"PM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"St. Vincent & Grenadines","code":"VC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sudan","code":"SD","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Suriname","code":"SR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Svalbard & Jan Mayen","code":"SJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Sweden","code":"SE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Switzerland","code":"CH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":false,"school_district":false}},{"name":"Syria","code":"SY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Taiwan","code":"TW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tajikistan","code":"TJ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tanzania","code":"TZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Thailand","code":"TH","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":true,"school_district":false}},{"name":"Timor-Leste","code":"TL","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Togo","code":"TG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tokelau","code":"TK","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tonga","code":"TO","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Trinidad & Tobago","code":"TT","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Tunisia","code":"TN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Türkiye","code":"TR","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Turkmenistan","code":"TM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Turks & Caicos Islands","code":"TC","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":true,"locality":false,"school_district":false}},{"name":"Tuvalu","code":"TV","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"U.S. Outlying Islands","code":"UM","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"U.S. Virgin Islands","code":"VI","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Uganda","code":"UG","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Ukraine","code":"UA","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"United Arab Emirates","code":"AE","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"United Kingdom","code":"GB","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":true,"school_district":false}},{"name":"United States","code":"US","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":true,"locality":true,"school_district":true}},{"name":"Uruguay","code":"UY","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Uzbekistan","code":"UZ","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Vanuatu","code":"VU","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Vatican City","code":"VA","feature":{"country":true,"administrative_area_level_1":false,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Venezuela","code":"VE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":true,"postal_code":false,"locality":false,"school_district":false}},{"name":"Vietnam","code":"VN","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Wallis & Futuna","code":"WF","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Yemen","code":"YE","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Zambia","code":"ZM","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}},{"name":"Zimbabwe","code":"ZW","feature":{"country":true,"administrative_area_level_1":true,"administrative_area_level_2":false,"postal_code":false,"locality":false,"school_district":false}}]`),t=document.querySelector(`gmp-map`),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;async function v(){await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`places`),google.maps.importLibrary(`marker`)]),r=t.innerMap,r.setOptions({mapTypeControl:!1}),n=document.querySelector(`gmp-place-autocomplete`),n.includedPrimaryTypes=[`(regions)`],l=document.getElementById(`pac-content`),o=document.getElementById(`pac-filter-option`),i=document.getElementById(`country-select`),a=document.getElementById(`feature-type-select`),s=document.getElementById(`fill-color-picker`),c=document.getElementById(`stroke-color-picker`),i.addEventListener(`change`,w),a.addEventListener(`change`,y),s.addEventListener(`change`,x),c.addEventListener(`change`,x),o.addEventListener(`change`,()=>{o.checked?(a.item(5).disabled=!0,b()):(a.item(5).disabled=!1,b())}),n.addEventListener(`gmp-select`,async({placePrediction:e})=>{let t=e.types,n=[`country`,`administrative_area_level_1`,`administrative_area_level_2`,`locality`,`postal_code`,`school_district`];for(let e of t)if(n.includes(e)){a.value=e;break}b(),A(e.placeId,1)}),d=r.getFeatureLayer(`COUNTRY`),f=r.getFeatureLayer(`ADMINISTRATIVE_AREA_LEVEL_1`),p=r.getFeatureLayer(`ADMINISTRATIVE_AREA_LEVEL_2`),m=r.getFeatureLayer(`LOCALITY`),h=r.getFeatureLayer(`POSTAL_CODE`),g=r.getFeatureLayer(`SCHOOL_DISTRICT`),d.addListener(`click`,O),f.addListener(`click`,O),p.addListener(`click`,O),m.addListener(`click`,O),h.addListener(`click`,O),g.addListener(`click`,O),u=[d,f,p,m,h,g],S(),C(),w(),a.selectedIndex=0}function y(){let e={fillColor:`white`,fillOpacity:.01,strokeColor:c.value,strokeOpacity:1,strokeWeight:2};switch(D(),b(),_=``,l.innerHTML=``,a.value){case`country`:d.style=e,o.disabled=!1;break;case`administrative_area_level_1`:f.style=e,o.disabled=!1;break;case`administrative_area_level_2`:p.style=e,o.disabled=!1;break;case`locality`:m.style=e,o.disabled=!1;break;case`postal_code`:h.style=e,o.disabled=!1;break;case`school_district`:g.style=e,o.disabled=!0;break;default:break}}function b(){o.checked?n.includedPrimaryTypes=[a.value]:n.includedPrimaryTypes=[`(regions)`]}function x(){_&&S(_)}function S(e){let t={strokeColor:c.value,strokeOpacity:1,strokeWeight:2,fillColor:`white`,fillOpacity:.1},n={strokeColor:c.value,strokeOpacity:1,strokeWeight:2,fillColor:s.value,fillOpacity:.5};D();let r=r=>r.feature.placeId==e?n:t;switch(a.value){case`country`:d.style=r,o.disabled=!1;break;case`administrative_area_level_1`:f.style=r,o.disabled=!1;break;case`administrative_area_level_2`:p.style=r,o.disabled=!1;break;case`locality`:m.style=r,o.disabled=!1;break;case`postal_code`:h.style=r,o.disabled=!1;break;case`school_district`:g.style=r,o.disabled=!0;break;default:break}}function C(){for(let t of e){let e=document.createElement(`option`);e.textContent=t.name,e.value=t.code,t.code==`US`&&(e.selected=!0),i.appendChild(e)}}function w(){let e=i.value;T(e),a.namedItem(`country`).selected=!0,k(i.options[i.selectedIndex].text)}function T(e){let t=E(e);for(let[e,n]of t){let t=a.namedItem(e);t&&(t.disabled=!n)}}function E(t){let n=e.find(e=>e.code===t);return new Map([[`country`,n?.feature.country],[`administrative_area_level_1`,n?.feature.administrative_area_level_1],[`administrative_area_level_2`,n?.feature.administrative_area_level_2],[`postal_code`,n?.feature.postal_code],[`locality`,n?.feature.locality],[`school_district`,n?.feature.school_district]])}function D(){for(let e of u)e.style=null}function O(e){let t=e.features[0].placeId;t&&A(t,0)}async function k(e){let{Place:t}=await google.maps.importLibrary(`places`);l.textContent=``;let n={textQuery:e,fields:[`id`]},{places:r}=await t.searchByText(n);r.length>0&&A(r[0].id,0)}async function A(e,t){let n,{Place:o}=await google.maps.importLibrary(`places`);_=e,l.textContent=``;let s=new o({id:e});await s.fetchFields({fields:[`displayName`,`formattedAddress`,`viewport`,`types`,`addressComponents`]});let c=s.addressComponents?.find(e=>e.types.includes(`country`));c&&(i.value=c.shortText,T(i.value),n=E(i.value).get(a.value));let u=s.viewport;r.fitBounds(u,155),l.appendChild(document.createElement(`hr`));let d=s.types,f=document.createElement(`div`);if(f.id=`place-info`,t==0){let t=document.createElement(`b`);t.textContent=s.formattedAddress;let n=document.createElement(`code`);n.textContent=e;let r=document.createElement(`code`);r.textContent=d[0],f.append(t),f.append(document.createElement(`br`),`Place ID: `,n),f.append(document.createElement(`br`),`Feature type: `,r)}else n?f.textContent=`Click a boundary to see its place ID and feature type.`:f.textContent=`Feature type (${a.value}) is not supported for this country.`;l.appendChild(f),S(e)}v(); \ No newline at end of file diff --git a/dist/samples/dds-region-viewer/dist/index.html b/dist/samples/dds-region-viewer/dist/index.html index f1df620c9..43e0ea6f7 100644 --- a/dist/samples/dds-region-viewer/dist/index.html +++ b/dist/samples/dds-region-viewer/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/samples/dds-region-viewer/docs/index.js b/dist/samples/dds-region-viewer/docs/index.js index 814321965..9b0203bf1 100644 --- a/dist/samples/dds-region-viewer/docs/index.js +++ b/dist/samples/dds-region-viewer/docs/index.js @@ -34,9 +34,11 @@ let selectedPlaceId; import * as countries from './src/countries.json'; async function initMap() { - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); - await google.maps.importLibrary('marker'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-region-viewer/docs/index.ts b/dist/samples/dds-region-viewer/docs/index.ts index bcba5a518..caf8730d5 100644 --- a/dist/samples/dds-region-viewer/docs/index.ts +++ b/dist/samples/dds-region-viewer/docs/index.ts @@ -34,9 +34,11 @@ let selectedPlaceId: string; import * as countries from './src/countries.json'; async function initMap() { - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); - await google.maps.importLibrary('marker'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/dds-region-viewer/jsfiddle/demo.js b/dist/samples/dds-region-viewer/jsfiddle/demo.js index c895f65ee..1a47e1af8 100644 --- a/dist/samples/dds-region-viewer/jsfiddle/demo.js +++ b/dist/samples/dds-region-viewer/jsfiddle/demo.js @@ -33,9 +33,11 @@ let selectedPlaceId; import * as countries from './src/countries.json'; async function initMap() { - await google.maps.importLibrary('maps'); - await google.maps.importLibrary('places'); - await google.maps.importLibrary('marker'); + await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // Get the inner map. innerMap = mapElement.innerMap; diff --git a/dist/samples/deckgl-heatmap/app/index.ts b/dist/samples/deckgl-heatmap/app/index.ts index b3b3ffdeb..31f5a1aec 100644 --- a/dist/samples/deckgl-heatmap/app/index.ts +++ b/dist/samples/deckgl-heatmap/app/index.ts @@ -50,8 +50,10 @@ async function initMap(): Promise { const position = { lat: 37.77325660358167, lng: -122.41712341793448 }; // Using the center from original deckgl-polygon.js // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapDiv = document.getElementById('map'); if (!mapDiv) { diff --git a/dist/samples/deckgl-heatmap/dist/assets/index-uAY8Ya9J.js b/dist/samples/deckgl-heatmap/dist/assets/index-Dyv4OsQ9.js similarity index 59% rename from dist/samples/deckgl-heatmap/dist/assets/index-uAY8Ya9J.js rename to dist/samples/deckgl-heatmap/dist/assets/index-Dyv4OsQ9.js index 6a34894f2..8c8a47faf 100644 --- a/dist/samples/deckgl-heatmap/dist/assets/index-uAY8Ya9J.js +++ b/dist/samples/deckgl-heatmap/dist/assets/index-Dyv4OsQ9.js @@ -1,4 +1,4 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t,n,r,i;async function a(){let a,o=document.querySelector(`.mdc-linear-progress`);o&&(a=new mdc.linearProgress.MDCLinearProgress(o),a.open(),a.determinate=!1,a.done=function(){a.close(),o?.remove()});let s={lat:37.77325660358167,lng:-122.41712341793448},{Map:c,InfoWindow:l}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:u}=await google.maps.importLibrary(`marker`),d=document.getElementById(`map`);if(!d){console.error(`Map element not found!`);return}e=new c(d,{zoom:13,center:s,tilt:90,heading:-25,mapId:`6b73a9fe7e831a00`,fullscreenControl:!1,clickableIcons:!1}),t=new deck.HeatmapLayer({id:`HeatmapLayer`,data:`https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-bike-parking.json`,getPosition:e=>e.COORDINATES,getWeight:e=>e.SPACES,radiusPixels:25,visible:!0,pickable:!0,onHover:e=>{let t=document.getElementById(`tooltip`);if(t){if(console.log(`Hovered object:`,e.object),e.object){let n=`

Bike Parking Info:

`;e.object.ADDRESS!==void 0&&(n+=`Address: ${e.object.ADDRESS}
`),e.object.RACKS!==void 0&&(n+=`Racks: ${e.object.RACKS}
`),e.object.SPACES!==void 0&&(n+=`Spaces: ${e.object.SPACES}
`),t.innerHTML=n,t.style.left=e.x+`px`,t.style.top=e.y+`px`,t.style.display=`block`}else t.style.display=`none`;console.log(`Tooltip content set to:`,t.innerHTML)}}}),t.pickable=!0,n=new deck.GoogleMapsOverlay({layers:[t],controller:!0}),n.setMap(e),a&&setTimeout(()=>{a.done()},100),i=new l,e.addListener(`click`,async t=>{let n=t.latLng;if(n)if(r){r.position=n;let t=` +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t,n,r,i;async function a(){let a,o=document.querySelector(`.mdc-linear-progress`);o&&(a=new mdc.linearProgress.MDCLinearProgress(o),a.open(),a.determinate=!1,a.done=function(){a.close(),o?.remove()});let s={lat:37.77325660358167,lng:-122.41712341793448},[{Map:c,InfoWindow:l},{AdvancedMarkerElement:u}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),d=document.getElementById(`map`);if(!d){console.error(`Map element not found!`);return}e=new c(d,{zoom:13,center:s,tilt:90,heading:-25,mapId:`6b73a9fe7e831a00`,fullscreenControl:!1,clickableIcons:!1}),t=new deck.HeatmapLayer({id:`HeatmapLayer`,data:`https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-bike-parking.json`,getPosition:e=>e.COORDINATES,getWeight:e=>e.SPACES,radiusPixels:25,visible:!0,pickable:!0,onHover:e=>{let t=document.getElementById(`tooltip`);if(t){if(console.log(`Hovered object:`,e.object),e.object){let n=`

Bike Parking Info:

`;e.object.ADDRESS!==void 0&&(n+=`Address: ${e.object.ADDRESS}
`),e.object.RACKS!==void 0&&(n+=`Racks: ${e.object.RACKS}
`),e.object.SPACES!==void 0&&(n+=`Spaces: ${e.object.SPACES}
`),t.innerHTML=n,t.style.left=e.x+`px`,t.style.top=e.y+`px`,t.style.display=`block`}else t.style.display=`none`;console.log(`Tooltip content set to:`,t.innerHTML)}}}),t.pickable=!0,n=new deck.GoogleMapsOverlay({layers:[t],controller:!0}),n.setMap(e),a&&setTimeout(()=>{a.done()},100),i=new l,e.addListener(`click`,async t=>{let n=t.latLng;if(n)if(r){r.position=n;let t=`
Location: ${n.lat().toFixed(3)}, ${n.lng().toFixed(3)}
`;i.setContent(t),i.open(e,r)}else{r=new u({map:e,position:n,gmpClickable:!0}),r.addEventListener(`gmp-click`,()=>{i.close();let t=` diff --git a/dist/samples/deckgl-heatmap/dist/index.html b/dist/samples/deckgl-heatmap/dist/index.html index 8b7437a0d..19432eb84 100644 --- a/dist/samples/deckgl-heatmap/dist/index.html +++ b/dist/samples/deckgl-heatmap/dist/index.html @@ -19,7 +19,7 @@ - + diff --git a/dist/samples/deckgl-heatmap/docs/index.js b/dist/samples/deckgl-heatmap/docs/index.js index 9929f37ad..95d476860 100644 --- a/dist/samples/deckgl-heatmap/docs/index.js +++ b/dist/samples/deckgl-heatmap/docs/index.js @@ -35,8 +35,10 @@ async function initMap() { const position = { lat: 37.77325660358167, lng: -122.41712341793448 }; // Using the center from original deckgl-polygon.js // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapDiv = document.getElementById('map'); if (!mapDiv) { diff --git a/dist/samples/deckgl-heatmap/docs/index.ts b/dist/samples/deckgl-heatmap/docs/index.ts index b3b3ffdeb..31f5a1aec 100644 --- a/dist/samples/deckgl-heatmap/docs/index.ts +++ b/dist/samples/deckgl-heatmap/docs/index.ts @@ -50,8 +50,10 @@ async function initMap(): Promise { const position = { lat: 37.77325660358167, lng: -122.41712341793448 }; // Using the center from original deckgl-polygon.js // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapDiv = document.getElementById('map'); if (!mapDiv) { diff --git a/dist/samples/deckgl-heatmap/jsfiddle/demo.js b/dist/samples/deckgl-heatmap/jsfiddle/demo.js index 7e81a82e1..e57bd61fb 100644 --- a/dist/samples/deckgl-heatmap/jsfiddle/demo.js +++ b/dist/samples/deckgl-heatmap/jsfiddle/demo.js @@ -34,8 +34,10 @@ async function initMap() { const position = { lat: 37.77325660358167, lng: -122.41712341793448 }; // Using the center from original deckgl-polygon.js // Request needed libraries. - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map, InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapDiv = document.getElementById('map'); if (!mapDiv) { diff --git a/dist/samples/event-arguments/app/index.ts b/dist/samples/event-arguments/app/index.ts index d327be6fe..f2d34f4c2 100644 --- a/dist/samples/event-arguments/app/index.ts +++ b/dist/samples/event-arguments/app/index.ts @@ -7,8 +7,10 @@ // [START maps_event_arguments] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map')!; const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-arguments/dist/assets/index-9xsPaR1I.js b/dist/samples/event-arguments/dist/assets/index-DLnAWehh.js similarity index 72% rename from dist/samples/event-arguments/dist/assets/index-9xsPaR1I.js rename to dist/samples/event-arguments/dist/assets/index-DLnAWehh.js index d32891454..6aaa1b6a1 100644 --- a/dist/samples/event-arguments/dist/assets/index-9xsPaR1I.js +++ b/dist/samples/event-arguments/dist/assets/index-DLnAWehh.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){await google.maps.importLibrary(`maps`);let{AdvancedMarkerElement:e}=await google.maps.importLibrary(`marker`),t=document.querySelector(`gmp-map`).innerMap;t.addListener(`click`,n=>{new e({position:n.latLng,map:t}),t.panTo(n.latLng)})}e(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[,{AdvancedMarkerElement:e}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),t=document.querySelector(`gmp-map`).innerMap;t.addListener(`click`,n=>{new e({position:n.latLng,map:t}),t.panTo(n.latLng)})}e(); \ No newline at end of file diff --git a/dist/samples/event-arguments/dist/index.html b/dist/samples/event-arguments/dist/index.html index a495cdf2c..f38dfd936 100644 --- a/dist/samples/event-arguments/dist/index.html +++ b/dist/samples/event-arguments/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/event-arguments/docs/index.js b/dist/samples/event-arguments/docs/index.js index c98b382e2..94270ac85 100644 --- a/dist/samples/event-arguments/docs/index.js +++ b/dist/samples/event-arguments/docs/index.js @@ -8,8 +8,10 @@ // [START maps_event_arguments] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map'); const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-arguments/docs/index.ts b/dist/samples/event-arguments/docs/index.ts index d327be6fe..f2d34f4c2 100644 --- a/dist/samples/event-arguments/docs/index.ts +++ b/dist/samples/event-arguments/docs/index.ts @@ -7,8 +7,10 @@ // [START maps_event_arguments] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map')!; const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-arguments/jsfiddle/demo.js b/dist/samples/event-arguments/jsfiddle/demo.js index e5fb56777..b1fa89c83 100644 --- a/dist/samples/event-arguments/jsfiddle/demo.js +++ b/dist/samples/event-arguments/jsfiddle/demo.js @@ -7,8 +7,10 @@ async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map'); const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-click-latlng/app/index.ts b/dist/samples/event-click-latlng/app/index.ts index 91a6a876b..17936bccb 100644 --- a/dist/samples/event-click-latlng/app/index.ts +++ b/dist/samples/event-click-latlng/app/index.ts @@ -7,7 +7,6 @@ // [START maps_event_click_latlng] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); const { InfoWindow } = await google.maps.importLibrary('maps'); // Set up the map. diff --git a/dist/samples/control-options/dist/assets/index-MVtQ68cR.js b/dist/samples/event-click-latlng/dist/assets/index-DKjZf3UX.js similarity index 67% rename from dist/samples/control-options/dist/assets/index-MVtQ68cR.js rename to dist/samples/event-click-latlng/dist/assets/index-DKjZf3UX.js index 7bdd13fc1..e16867f54 100644 --- a/dist/samples/control-options/dist/assets/index-MVtQ68cR.js +++ b/dist/samples/event-click-latlng/dist/assets/index-DKjZf3UX.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{MapTypeControlStyle:e,MapTypeId:t}=await google.maps.importLibrary(`maps`),{ControlPosition:n}=await google.maps.importLibrary(`core`);document.querySelector(`gmp-map`).innerMap.setOptions({mapTypeControl:!0,mapTypeControlOptions:{style:e.DROPDOWN_MENU,mapTypeIds:[t.ROADMAP,t.TERRAIN],position:n.TOP_CENTER}})}e(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{InfoWindow:e}=await google.maps.importLibrary(`maps`),t=document.querySelector(`gmp-map`).innerMap,n=new e({content:`Click the map to get Lat/Lng!`,position:t.getCenter()});n.open(t),t.addListener(`click`,r=>{n.close(),n=new e({position:r.latLng}),n.setContent(JSON.stringify(r.latLng.toJSON(),null,2)),n.open(t)})}e(); \ No newline at end of file diff --git a/dist/samples/event-click-latlng/dist/index.html b/dist/samples/event-click-latlng/dist/index.html index 363d5bf34..4ec1b2f17 100644 --- a/dist/samples/event-click-latlng/dist/index.html +++ b/dist/samples/event-click-latlng/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/event-click-latlng/docs/index.js b/dist/samples/event-click-latlng/docs/index.js index b51c2573d..42499f8a9 100644 --- a/dist/samples/event-click-latlng/docs/index.js +++ b/dist/samples/event-click-latlng/docs/index.js @@ -8,7 +8,6 @@ // [START maps_event_click_latlng] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); const { InfoWindow } = await google.maps.importLibrary('maps'); // Set up the map. diff --git a/dist/samples/event-click-latlng/docs/index.ts b/dist/samples/event-click-latlng/docs/index.ts index 91a6a876b..17936bccb 100644 --- a/dist/samples/event-click-latlng/docs/index.ts +++ b/dist/samples/event-click-latlng/docs/index.ts @@ -7,7 +7,6 @@ // [START maps_event_click_latlng] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); const { InfoWindow } = await google.maps.importLibrary('maps'); // Set up the map. diff --git a/dist/samples/event-click-latlng/jsfiddle/demo.js b/dist/samples/event-click-latlng/jsfiddle/demo.js index 9287f7291..2ec48e389 100644 --- a/dist/samples/event-click-latlng/jsfiddle/demo.js +++ b/dist/samples/event-click-latlng/jsfiddle/demo.js @@ -7,7 +7,6 @@ async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); const { InfoWindow } = await google.maps.importLibrary('maps'); // Set up the map. diff --git a/dist/samples/event-closure/app/index.ts b/dist/samples/event-closure/app/index.ts index 5928625db..f70142f53 100644 --- a/dist/samples/event-closure/app/index.ts +++ b/dist/samples/event-closure/app/index.ts @@ -7,8 +7,10 @@ // [START maps_event_closure] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map')!; const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-closure/dist/assets/index-DneOOct4.js b/dist/samples/event-closure/dist/assets/index-Drl7MJNE.js similarity index 53% rename from dist/samples/event-closure/dist/assets/index-DneOOct4.js rename to dist/samples/event-closure/dist/assets/index-Drl7MJNE.js index 9eb80334d..c7e3e9022 100644 --- a/dist/samples/event-closure/dist/assets/index-DneOOct4.js +++ b/dist/samples/event-closure/dist/assets/index-Drl7MJNE.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){await google.maps.importLibrary(`maps`);let{AdvancedMarkerElement:e}=await google.maps.importLibrary(`marker`),n=document.querySelector(`gmp-map`).innerMap,r={north:-25.363882,south:-31.203405,east:131.044922,west:125.244141};n.fitBounds(r);let i=[`This`,`is`,`the`,`secret`,`message`],a=r.east-r.west,o=r.north-r.south;for(let s=0;s{r.open(e.map,e)})}e(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[,{AdvancedMarkerElement:e}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),n=document.querySelector(`gmp-map`).innerMap,r={north:-25.363882,south:-31.203405,east:131.044922,west:125.244141};n.fitBounds(r);let i=[`This`,`is`,`the`,`secret`,`message`],a=r.east-r.west,o=r.north-r.south;for(let s=0;s{r.open(e.map,e)})}e(); \ No newline at end of file diff --git a/dist/samples/event-closure/dist/index.html b/dist/samples/event-closure/dist/index.html index d195e053a..f58648ef2 100644 --- a/dist/samples/event-closure/dist/index.html +++ b/dist/samples/event-closure/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/event-closure/docs/index.js b/dist/samples/event-closure/docs/index.js index e42b8abc1..ef8f5f4af 100644 --- a/dist/samples/event-closure/docs/index.js +++ b/dist/samples/event-closure/docs/index.js @@ -8,8 +8,10 @@ // [START maps_event_closure] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map'); const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-closure/docs/index.ts b/dist/samples/event-closure/docs/index.ts index 5928625db..f70142f53 100644 --- a/dist/samples/event-closure/docs/index.ts +++ b/dist/samples/event-closure/docs/index.ts @@ -7,8 +7,10 @@ // [START maps_event_closure] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map')!; const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-closure/jsfiddle/demo.js b/dist/samples/event-closure/jsfiddle/demo.js index 7ceeb6991..0320360c5 100644 --- a/dist/samples/event-closure/jsfiddle/demo.js +++ b/dist/samples/event-closure/jsfiddle/demo.js @@ -7,8 +7,10 @@ async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); const mapElement = document.querySelector('gmp-map'); const innerMap = mapElement.innerMap; diff --git a/dist/samples/event-simple/app/index.ts b/dist/samples/event-simple/app/index.ts index fda76a066..e7941b3cf 100644 --- a/dist/samples/event-simple/app/index.ts +++ b/dist/samples/event-simple/app/index.ts @@ -7,9 +7,11 @@ // [START maps_event_simple] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Retrieve the map element. const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/event-simple/dist/assets/index-BbzkWttN.js b/dist/samples/event-simple/dist/assets/index-9XSPUjum.js similarity index 60% rename from dist/samples/event-simple/dist/assets/index-BbzkWttN.js rename to dist/samples/event-simple/dist/assets/index-9XSPUjum.js index 0d4af3b68..b673610e5 100644 --- a/dist/samples/event-simple/dist/assets/index-BbzkWttN.js +++ b/dist/samples/event-simple/dist/assets/index-9XSPUjum.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){await google.maps.importLibrary(`maps`);let{AdvancedMarkerElement:e}=await google.maps.importLibrary(`marker`),{LatLng:t}=await google.maps.importLibrary(`core`),n=document.querySelector(`gmp-map`),r=n.innerMap,i=new t(n.center),a=new e({position:i,map:r,title:`Click to zoom`,gmpClickable:!0});r.addListener(`center_changed`,()=>{window.setTimeout(()=>{r.panTo(i)},3e3)}),a.addEventListener(`gmp-click`,()=>{r.setZoom(8),r.setCenter(i)})}e(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[,{AdvancedMarkerElement:e},{LatLng:t}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`),google.maps.importLibrary(`core`)]),n=document.querySelector(`gmp-map`),r=n.innerMap,i=new t(n.center),a=new e({position:i,map:r,title:`Click to zoom`,gmpClickable:!0});r.addListener(`center_changed`,()=>{window.setTimeout(()=>{r.panTo(i)},3e3)}),a.addEventListener(`gmp-click`,()=>{r.setZoom(8),r.setCenter(i)})}e(); \ No newline at end of file diff --git a/dist/samples/event-simple/dist/index.html b/dist/samples/event-simple/dist/index.html index cc06a15b7..bcafa6b25 100644 --- a/dist/samples/event-simple/dist/index.html +++ b/dist/samples/event-simple/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/event-simple/docs/index.js b/dist/samples/event-simple/docs/index.js index 084f30cc0..5ff834b1a 100644 --- a/dist/samples/event-simple/docs/index.js +++ b/dist/samples/event-simple/docs/index.js @@ -8,9 +8,11 @@ // [START maps_event_simple] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Retrieve the map element. const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/event-simple/docs/index.ts b/dist/samples/event-simple/docs/index.ts index fda76a066..e7941b3cf 100644 --- a/dist/samples/event-simple/docs/index.ts +++ b/dist/samples/event-simple/docs/index.ts @@ -7,9 +7,11 @@ // [START maps_event_simple] async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Retrieve the map element. const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/event-simple/jsfiddle/demo.js b/dist/samples/event-simple/jsfiddle/demo.js index bd6b570dc..38e66528b 100644 --- a/dist/samples/event-simple/jsfiddle/demo.js +++ b/dist/samples/event-simple/jsfiddle/demo.js @@ -7,9 +7,11 @@ async function initMap() { // Request needed libraries. - await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); // Retrieve the map element. const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/infowindow-simple/app/index.ts b/dist/samples/infowindow-simple/app/index.ts index 3642b2aaf..778f9b2b4 100644 --- a/dist/samples/infowindow-simple/app/index.ts +++ b/dist/samples/infowindow-simple/app/index.ts @@ -10,8 +10,10 @@ async function initMap(): Promise { // Import the needed libraries. - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/infowindow-simple/dist/assets/index-Dry0V3xT.js b/dist/samples/infowindow-simple/dist/assets/index-Dz3r0NRJ.js similarity index 79% rename from dist/samples/infowindow-simple/dist/assets/index-Dry0V3xT.js rename to dist/samples/infowindow-simple/dist/assets/index-Dz3r0NRJ.js index a6c5c0cde..bc1f71e8b 100644 --- a/dist/samples/infowindow-simple/dist/assets/index-Dry0V3xT.js +++ b/dist/samples/infowindow-simple/dist/assets/index-Dz3r0NRJ.js @@ -1,4 +1,4 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let{InfoWindow:e}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:t}=await google.maps.importLibrary(`marker`),n=document.querySelector(`gmp-map`),r=n.innerMap,i=n.center,a=document.createElement(`h1`);a.textContent=`Uluru (Ayers Rock)`;let o=document.createElement(`div`),s=document.createElement(`p`);s.textContent=`Uluru, also referred to as Ayers Rock, is a large sandstone rock formation +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[{InfoWindow:e},{AdvancedMarkerElement:t}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),n=document.querySelector(`gmp-map`),r=n.innerMap,i=n.center,a=document.createElement(`h1`);a.textContent=`Uluru (Ayers Rock)`;let o=document.createElement(`div`),s=document.createElement(`p`);s.textContent=`Uluru, also referred to as Ayers Rock, is a large sandstone rock formation in the southern part of the Northern Territory, central Australia. It lies 335 km (208 mi) south west of the nearest large town, Alice Springs; 450 km (280 mi) by road. Kata Tjuta and Uluru are the two major features of the diff --git a/dist/samples/infowindow-simple/dist/index.html b/dist/samples/infowindow-simple/dist/index.html index ccdacbe05..90a3bec1e 100644 --- a/dist/samples/infowindow-simple/dist/index.html +++ b/dist/samples/infowindow-simple/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/infowindow-simple/docs/index.js b/dist/samples/infowindow-simple/docs/index.js index 295e03a6c..ceac1579a 100644 --- a/dist/samples/infowindow-simple/docs/index.js +++ b/dist/samples/infowindow-simple/docs/index.js @@ -11,8 +11,10 @@ async function initMap() { // Import the needed libraries. - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/infowindow-simple/docs/index.ts b/dist/samples/infowindow-simple/docs/index.ts index 3642b2aaf..778f9b2b4 100644 --- a/dist/samples/infowindow-simple/docs/index.ts +++ b/dist/samples/infowindow-simple/docs/index.ts @@ -10,8 +10,10 @@ async function initMap(): Promise { // Import the needed libraries. - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/infowindow-simple/jsfiddle/demo.js b/dist/samples/infowindow-simple/jsfiddle/demo.js index 250c46a9b..c2c5979f4 100644 --- a/dist/samples/infowindow-simple/jsfiddle/demo.js +++ b/dist/samples/infowindow-simple/jsfiddle/demo.js @@ -10,8 +10,10 @@ async function initMap() { // Import the needed libraries. - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ InfoWindow }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/layer-data-quakes-red/app/index.ts b/dist/samples/layer-data-quakes-red/app/index.ts index 916da1698..f6e658ff3 100644 --- a/dist/samples/layer-data-quakes-red/app/index.ts +++ b/dist/samples/layer-data-quakes-red/app/index.ts @@ -8,8 +8,10 @@ let innerMap; async function initMap() { - await google.maps.importLibrary('maps'); - const { SymbolPath } = await google.maps.importLibrary('core'); + const [, { SymbolPath }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/layer-data-quakes-red/dist/assets/index-DbjGu7g7.js b/dist/samples/layer-data-quakes-red/dist/assets/index-wSCHVohg.js similarity index 56% rename from dist/samples/layer-data-quakes-red/dist/assets/index-DbjGu7g7.js rename to dist/samples/layer-data-quakes-red/dist/assets/index-wSCHVohg.js index ae665c1e2..de4a7a864 100644 --- a/dist/samples/layer-data-quakes-red/dist/assets/index-DbjGu7g7.js +++ b/dist/samples/layer-data-quakes-red/dist/assets/index-wSCHVohg.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e;async function t(){await google.maps.importLibrary(`maps`);let{SymbolPath:t}=await google.maps.importLibrary(`core`);e=document.querySelector(`gmp-map`).innerMap;let n=document.createElement(`script`);n.setAttribute(`src`,`quakes.geo.js`),document.getElementsByTagName(`head`)[0].appendChild(n),e.data.setStyle(e=>{let n=Math.exp(parseFloat(e.getProperty(`mag`)))*.1;return{icon:{path:t.CIRCLE,scale:n,fillColor:`#f00`,fillOpacity:.35,strokeWeight:0}}})}function n(t){e.data.addGeoJson(t)}window.earthquakeDataLoad=n,t(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e;async function t(){let[,{SymbolPath:t}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);e=document.querySelector(`gmp-map`).innerMap;let n=document.createElement(`script`);n.setAttribute(`src`,`quakes.geo.js`),document.getElementsByTagName(`head`)[0].appendChild(n),e.data.setStyle(e=>{let n=Math.exp(parseFloat(e.getProperty(`mag`)))*.1;return{icon:{path:t.CIRCLE,scale:n,fillColor:`#f00`,fillOpacity:.35,strokeWeight:0}}})}function n(t){e.data.addGeoJson(t)}window.earthquakeDataLoad=n,t(); \ No newline at end of file diff --git a/dist/samples/layer-data-quakes-red/dist/index.html b/dist/samples/layer-data-quakes-red/dist/index.html index 927a0a4ad..a7901a3a0 100644 --- a/dist/samples/layer-data-quakes-red/dist/index.html +++ b/dist/samples/layer-data-quakes-red/dist/index.html @@ -14,7 +14,7 @@ - + diff --git a/dist/samples/layer-data-quakes-red/docs/index.js b/dist/samples/layer-data-quakes-red/docs/index.js index 5a7910783..75f2e513e 100644 --- a/dist/samples/layer-data-quakes-red/docs/index.js +++ b/dist/samples/layer-data-quakes-red/docs/index.js @@ -9,8 +9,10 @@ let innerMap; async function initMap() { - await google.maps.importLibrary('maps'); - const { SymbolPath } = await google.maps.importLibrary('core'); + const [, { SymbolPath }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/layer-data-quakes-red/docs/index.ts b/dist/samples/layer-data-quakes-red/docs/index.ts index 916da1698..f6e658ff3 100644 --- a/dist/samples/layer-data-quakes-red/docs/index.ts +++ b/dist/samples/layer-data-quakes-red/docs/index.ts @@ -8,8 +8,10 @@ let innerMap; async function initMap() { - await google.maps.importLibrary('maps'); - const { SymbolPath } = await google.maps.importLibrary('core'); + const [, { SymbolPath }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/layer-data-quakes-red/jsfiddle/demo.js b/dist/samples/layer-data-quakes-red/jsfiddle/demo.js index c7423a1f2..12b695793 100644 --- a/dist/samples/layer-data-quakes-red/jsfiddle/demo.js +++ b/dist/samples/layer-data-quakes-red/jsfiddle/demo.js @@ -8,8 +8,10 @@ let innerMap; async function initMap() { - await google.maps.importLibrary('maps'); - const { SymbolPath } = await google.maps.importLibrary('core'); + const [, { SymbolPath }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/layer-data-style/app/index.ts b/dist/samples/layer-data-style/app/index.ts index c40458f97..2178fe34f 100644 --- a/dist/samples/layer-data-style/app/index.ts +++ b/dist/samples/layer-data-style/app/index.ts @@ -6,8 +6,10 @@ // [START maps_layer_data_style] async function initMap() { - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/layer-data-style/dist/assets/index-DdGWq7AA.js b/dist/samples/layer-data-style/dist/assets/index-CkmsX2aC.js similarity index 71% rename from dist/samples/layer-data-style/dist/assets/index-DdGWq7AA.js rename to dist/samples/layer-data-style/dist/assets/index-CkmsX2aC.js index b99de76f0..1d11d0e47 100644 --- a/dist/samples/layer-data-style/dist/assets/index-DdGWq7AA.js +++ b/dist/samples/layer-data-style/dist/assets/index-CkmsX2aC.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){await google.maps.importLibrary(`maps`);let{event:e}=await google.maps.importLibrary(`core`),t=document.querySelector(`gmp-map`).innerMap;e.addListenerOnce(t,`idle`,()=>{t.data.loadGeoJson(`google.json`)}),t.data.setStyle({fillColor:`green`,strokeWeight:1})}e(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function e(){let[,{event:e}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]),t=document.querySelector(`gmp-map`).innerMap;e.addListenerOnce(t,`idle`,()=>{t.data.loadGeoJson(`google.json`)}),t.data.setStyle({fillColor:`green`,strokeWeight:1})}e(); \ No newline at end of file diff --git a/dist/samples/layer-data-style/dist/index.html b/dist/samples/layer-data-style/dist/index.html index a0dc3c4f2..7ba53927e 100644 --- a/dist/samples/layer-data-style/dist/index.html +++ b/dist/samples/layer-data-style/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/layer-data-style/docs/index.js b/dist/samples/layer-data-style/docs/index.js index e0c551865..854d19baf 100644 --- a/dist/samples/layer-data-style/docs/index.js +++ b/dist/samples/layer-data-style/docs/index.js @@ -7,8 +7,10 @@ // [START maps_layer_data_style] async function initMap() { - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/layer-data-style/docs/index.ts b/dist/samples/layer-data-style/docs/index.ts index c40458f97..2178fe34f 100644 --- a/dist/samples/layer-data-style/docs/index.ts +++ b/dist/samples/layer-data-style/docs/index.ts @@ -6,8 +6,10 @@ // [START maps_layer_data_style] async function initMap() { - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map')!; diff --git a/dist/samples/layer-data-style/jsfiddle/demo.js b/dist/samples/layer-data-style/jsfiddle/demo.js index 12b5125ea..95bc3dbcb 100644 --- a/dist/samples/layer-data-style/jsfiddle/demo.js +++ b/dist/samples/layer-data-style/jsfiddle/demo.js @@ -6,8 +6,10 @@ */ async function initMap() { - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const mapElement = document.querySelector('gmp-map'); diff --git a/dist/samples/map-projection-simple/app/index.ts b/dist/samples/map-projection-simple/app/index.ts index f2a220724..4ad9578bc 100644 --- a/dist/samples/map-projection-simple/app/index.ts +++ b/dist/samples/map-projection-simple/app/index.ts @@ -51,8 +51,10 @@ async function initMap() { let gallPetersMapType; async function initGallPeters() { - const { ImageMapType } = await google.maps.importLibrary('maps'); - const { Size, Point, LatLng } = await google.maps.importLibrary('core'); + const [{ ImageMapType }, { Size, Point, LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const GALL_PETERS_RANGE_X = 800; const GALL_PETERS_RANGE_Y = 512; diff --git a/dist/samples/map-projection-simple/dist/assets/index-BnMy29Mt.js b/dist/samples/map-projection-simple/dist/assets/index-BnMy29Mt.js new file mode 100644 index 000000000..c0553e10d --- /dev/null +++ b/dist/samples/map-projection-simple/dist/assets/index-BnMy29Mt.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;async function n(){await google.maps.importLibrary(`maps`),t=e.innerMap,t.setOptions({mapTypeControl:!1}),i(),t.mapTypes.set(`gallPeters`,r),t.setMapTypeId(`gallPeters`);let n=document.getElementById(`coords`);t.addListener(`mousemove`,e=>{n.textContent=`lat: `+Math.round(e.latLng.lat())+`, lng: `+Math.round(e.latLng.lng())}),t.data.setStyle(e=>({title:e.getProperty(`name`),optimized:!1})),t.data.addGeoJson(a)}var r;async function i(){let[{ImageMapType:e},{Size:t,Point:n,LatLng:i}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);r=new e({getTileUrl:function(e,t){let n=1<=n?``:`gall-peters_`+t+`_`+r+`_`+i+`.png`},tileSize:new t(800,512),minZoom:0,maxZoom:1,name:`Gall-Peters`}),r.projection={fromLatLngToPoint:function(e){let t=e.lat()*Math.PI/180;return new n(800*(.5+e.lng()/360),512*(.5-.5*Math.sin(t)))},fromPointToLatLng:function(e,t){let n=e.x/800,r=Math.max(0,Math.min(1,e.y/512));return new i(Math.asin(1-2*r)*180/Math.PI,-180+360*n,t)}}}var a={type:`FeatureCollection`,features:[{type:`Feature`,geometry:{type:`Point`,coordinates:[-87.65,41.85]},properties:{name:`Chicago`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[-149.9,61.218]},properties:{name:`Anchorage`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[-99.127,19.427]},properties:{name:`Mexico City`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[-.126,51.5]},properties:{name:`London`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[28.045,-26.201]},properties:{name:`Johannesburg`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[15.322,-4.325]},properties:{name:`Kinshasa`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[151.207,-33.867]},properties:{name:`Sydney`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[0,0]},properties:{name:`0°N 0°E`}}]};n(); \ No newline at end of file diff --git a/dist/samples/map-projection-simple/dist/assets/index-DUAL-T2t.js b/dist/samples/map-projection-simple/dist/assets/index-DUAL-T2t.js deleted file mode 100644 index 0543ebc22..000000000 --- a/dist/samples/map-projection-simple/dist/assets/index-DUAL-T2t.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;async function n(){await google.maps.importLibrary(`maps`),t=e.innerMap,t.setOptions({mapTypeControl:!1}),i(),t.mapTypes.set(`gallPeters`,r),t.setMapTypeId(`gallPeters`);let n=document.getElementById(`coords`);t.addListener(`mousemove`,e=>{n.textContent=`lat: `+Math.round(e.latLng.lat())+`, lng: `+Math.round(e.latLng.lng())}),t.data.setStyle(e=>({title:e.getProperty(`name`),optimized:!1})),t.data.addGeoJson(a)}var r;async function i(){let{ImageMapType:e}=await google.maps.importLibrary(`maps`),{Size:t,Point:n,LatLng:i}=await google.maps.importLibrary(`core`);r=new e({getTileUrl:function(e,t){let n=1<=n?``:`gall-peters_`+t+`_`+r+`_`+i+`.png`},tileSize:new t(800,512),minZoom:0,maxZoom:1,name:`Gall-Peters`}),r.projection={fromLatLngToPoint:function(e){let t=e.lat()*Math.PI/180;return new n(800*(.5+e.lng()/360),512*(.5-.5*Math.sin(t)))},fromPointToLatLng:function(e,t){let n=e.x/800,r=Math.max(0,Math.min(1,e.y/512));return new i(Math.asin(1-2*r)*180/Math.PI,-180+360*n,t)}}}var a={type:`FeatureCollection`,features:[{type:`Feature`,geometry:{type:`Point`,coordinates:[-87.65,41.85]},properties:{name:`Chicago`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[-149.9,61.218]},properties:{name:`Anchorage`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[-99.127,19.427]},properties:{name:`Mexico City`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[-.126,51.5]},properties:{name:`London`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[28.045,-26.201]},properties:{name:`Johannesburg`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[15.322,-4.325]},properties:{name:`Kinshasa`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[151.207,-33.867]},properties:{name:`Sydney`}},{type:`Feature`,geometry:{type:`Point`,coordinates:[0,0]},properties:{name:`0°N 0°E`}}]};n(); \ No newline at end of file diff --git a/dist/samples/map-projection-simple/dist/index.html b/dist/samples/map-projection-simple/dist/index.html index edf661f5d..00c295af2 100644 --- a/dist/samples/map-projection-simple/dist/index.html +++ b/dist/samples/map-projection-simple/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/samples/map-projection-simple/docs/index.js b/dist/samples/map-projection-simple/docs/index.js index 45597cbad..2658e2b4f 100644 --- a/dist/samples/map-projection-simple/docs/index.js +++ b/dist/samples/map-projection-simple/docs/index.js @@ -52,8 +52,10 @@ async function initMap() { let gallPetersMapType; async function initGallPeters() { - const { ImageMapType } = await google.maps.importLibrary('maps'); - const { Size, Point, LatLng } = await google.maps.importLibrary('core'); + const [{ ImageMapType }, { Size, Point, LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const GALL_PETERS_RANGE_X = 800; const GALL_PETERS_RANGE_Y = 512; diff --git a/dist/samples/map-projection-simple/docs/index.ts b/dist/samples/map-projection-simple/docs/index.ts index f2a220724..4ad9578bc 100644 --- a/dist/samples/map-projection-simple/docs/index.ts +++ b/dist/samples/map-projection-simple/docs/index.ts @@ -51,8 +51,10 @@ async function initMap() { let gallPetersMapType; async function initGallPeters() { - const { ImageMapType } = await google.maps.importLibrary('maps'); - const { Size, Point, LatLng } = await google.maps.importLibrary('core'); + const [{ ImageMapType }, { Size, Point, LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const GALL_PETERS_RANGE_X = 800; const GALL_PETERS_RANGE_Y = 512; diff --git a/dist/samples/map-projection-simple/jsfiddle/demo.js b/dist/samples/map-projection-simple/jsfiddle/demo.js index f8f49d9c6..afa1e6933 100644 --- a/dist/samples/map-projection-simple/jsfiddle/demo.js +++ b/dist/samples/map-projection-simple/jsfiddle/demo.js @@ -51,8 +51,10 @@ async function initMap() { let gallPetersMapType; async function initGallPeters() { - const { ImageMapType } = await google.maps.importLibrary('maps'); - const { Size, Point, LatLng } = await google.maps.importLibrary('core'); + const [{ ImageMapType }, { Size, Point, LatLng }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const GALL_PETERS_RANGE_X = 800; const GALL_PETERS_RANGE_Y = 512; diff --git a/dist/samples/place-autocomplete-basic-map/app/index.ts b/dist/samples/place-autocomplete-basic-map/app/index.ts index 6501d4f1e..3667791d5 100644 --- a/dist/samples/place-autocomplete-basic-map/app/index.ts +++ b/dist/samples/place-autocomplete-basic-map/app/index.ts @@ -16,10 +16,13 @@ const gmpMapElement = document.querySelector('gmp-map')!; async function initMap(): Promise { // Asynchronously load required libraries from the Google Maps JS API. - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { InfoWindow, Circle } = await google.maps.importLibrary('maps'); - const { Size } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { InfoWindow, Circle }, { Size }] = + await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the initial center directly from the gmp-map element's property. const center = gmpMapElement.center; diff --git a/dist/samples/place-autocomplete-basic-map/dist/assets/index-BkmoCl81.js b/dist/samples/place-autocomplete-basic-map/dist/assets/index-DeO0XQ2l.js similarity index 82% rename from dist/samples/place-autocomplete-basic-map/dist/assets/index-BkmoCl81.js rename to dist/samples/place-autocomplete-basic-map/dist/assets/index-DeO0XQ2l.js index a5d9ae74e..fef69abfb 100644 --- a/dist/samples/place-autocomplete-basic-map/dist/assets/index-BkmoCl81.js +++ b/dist/samples/place-autocomplete-basic-map/dist/assets/index-DeO0XQ2l.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-basic-place-autocomplete`),t=document.querySelector(`gmp-place-details-compact`),n=t.parentElement,r=document.querySelector(`gmp-map`);async function i(){await google.maps.importLibrary(`places`);let{AdvancedMarkerElement:i}=await google.maps.importLibrary(`marker`),{InfoWindow:a,Circle:o}=await google.maps.importLibrary(`maps`),{Size:s}=await google.maps.importLibrary(`core`);e.locationBias=r.center;let c=r.innerMap;c.setOptions({clickableIcons:!1,mapTypeControl:!1,streetViewControl:!1});let l=new i({map:c,collisionBehavior:`REQUIRED_AND_HIDES_OPTIONAL`}),u=new a({minWidth:360,disableAutoPan:!0,headerDisabled:!0,pixelOffset:new s(0,-10)});e.addEventListener(`gmp-select`,e=>{n.appendChild(t),t.style.display=`block`,l.position=null,u.close();let r=t.querySelector(`gmp-place-details-place-request`);r.place=e.place.id}),t.addEventListener(`gmp-load`,()=>{let e=t.place?.location;if(!e){l.position=null;return}l.position=e,u.setContent(t),u.open({map:c,anchor:l}),c.setCenter(e)}),c.addListener(`click`,()=>{u.close(),l.position=null}),c.addListener(`idle`,()=>{e.locationBias=new o({center:c.getCenter(),radius:1e4})})}i(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-basic-place-autocomplete`),t=document.querySelector(`gmp-place-details-compact`),n=t.parentElement,r=document.querySelector(`gmp-map`);async function i(){let[,{AdvancedMarkerElement:i},{InfoWindow:a,Circle:o},{Size:s}]=await Promise.all([google.maps.importLibrary(`places`),google.maps.importLibrary(`marker`),google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);e.locationBias=r.center;let c=r.innerMap;c.setOptions({clickableIcons:!1,mapTypeControl:!1,streetViewControl:!1});let l=new i({map:c,collisionBehavior:`REQUIRED_AND_HIDES_OPTIONAL`}),u=new a({minWidth:360,disableAutoPan:!0,headerDisabled:!0,pixelOffset:new s(0,-10)});e.addEventListener(`gmp-select`,e=>{n.appendChild(t),t.style.display=`block`,l.position=null,u.close();let r=t.querySelector(`gmp-place-details-place-request`);r.place=e.place.id}),t.addEventListener(`gmp-load`,()=>{let e=t.place?.location;if(!e){l.position=null;return}l.position=e,u.setContent(t),u.open({map:c,anchor:l}),c.setCenter(e)}),c.addListener(`click`,()=>{u.close(),l.position=null}),c.addListener(`idle`,()=>{e.locationBias=new o({center:c.getCenter(),radius:1e4})})}i(); \ No newline at end of file diff --git a/dist/samples/place-autocomplete-basic-map/dist/index.html b/dist/samples/place-autocomplete-basic-map/dist/index.html index 58722c207..60dbf999c 100644 --- a/dist/samples/place-autocomplete-basic-map/dist/index.html +++ b/dist/samples/place-autocomplete-basic-map/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/place-autocomplete-basic-map/docs/index.js b/dist/samples/place-autocomplete-basic-map/docs/index.js index 830cba782..d34bf1317 100644 --- a/dist/samples/place-autocomplete-basic-map/docs/index.js +++ b/dist/samples/place-autocomplete-basic-map/docs/index.js @@ -15,10 +15,13 @@ const gmpMapElement = document.querySelector('gmp-map'); async function initMap() { // Asynchronously load required libraries from the Google Maps JS API. - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { InfoWindow, Circle } = await google.maps.importLibrary('maps'); - const { Size } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { InfoWindow, Circle }, { Size }] = + await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the initial center directly from the gmp-map element's property. const center = gmpMapElement.center; diff --git a/dist/samples/place-autocomplete-basic-map/docs/index.ts b/dist/samples/place-autocomplete-basic-map/docs/index.ts index 6501d4f1e..3667791d5 100644 --- a/dist/samples/place-autocomplete-basic-map/docs/index.ts +++ b/dist/samples/place-autocomplete-basic-map/docs/index.ts @@ -16,10 +16,13 @@ const gmpMapElement = document.querySelector('gmp-map')!; async function initMap(): Promise { // Asynchronously load required libraries from the Google Maps JS API. - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { InfoWindow, Circle } = await google.maps.importLibrary('maps'); - const { Size } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { InfoWindow, Circle }, { Size }] = + await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the initial center directly from the gmp-map element's property. const center = gmpMapElement.center; diff --git a/dist/samples/place-autocomplete-basic-map/jsfiddle/demo.js b/dist/samples/place-autocomplete-basic-map/jsfiddle/demo.js index 98faf62c5..755327546 100644 --- a/dist/samples/place-autocomplete-basic-map/jsfiddle/demo.js +++ b/dist/samples/place-autocomplete-basic-map/jsfiddle/demo.js @@ -14,10 +14,13 @@ const gmpMapElement = document.querySelector('gmp-map'); async function initMap() { // Asynchronously load required libraries from the Google Maps JS API. - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { InfoWindow, Circle } = await google.maps.importLibrary('maps'); - const { Size } = await google.maps.importLibrary('core'); + const [, { AdvancedMarkerElement }, { InfoWindow, Circle }, { Size }] = + await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); // Get the initial center directly from the gmp-map element's property. const center = gmpMapElement.center; diff --git a/dist/samples/place-class/app/index.ts b/dist/samples/place-class/app/index.ts index e4c4aa703..b84438ce0 100644 --- a/dist/samples/place-class/app/index.ts +++ b/dist/samples/place-class/app/index.ts @@ -19,8 +19,11 @@ async function initMap() { // [START maps_place_class_fetchfields] async function getPlaceDetails() { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); + // Use place ID to create a new Place instance. const place = new Place({ id: 'ChIJyYB_SZVU2YARR-I1Jjf08F0', // San Diego Zoo diff --git a/dist/samples/place-class/dist/assets/index-DmuaJVcI.js b/dist/samples/place-class/dist/assets/index-Dm0POAQS.js similarity index 52% rename from dist/samples/place-class/dist/assets/index-DmuaJVcI.js rename to dist/samples/place-class/dist/assets/index-Dm0POAQS.js index 44e2e8b4a..801216f23 100644 --- a/dist/samples/place-class/dist/assets/index-DmuaJVcI.js +++ b/dist/samples/place-class/dist/assets/index-Dm0POAQS.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t,n;async function r(){let{Map:r,InfoWindow:a}=await google.maps.importLibrary(`maps`);t=e.innerMap,n=new a,i()}async function i(){let{Place:e}=await google.maps.importLibrary(`places`),{AdvancedMarkerElement:r}=await google.maps.importLibrary(`marker`),i=new e({id:`ChIJyYB_SZVU2YARR-I1Jjf08F0`});await i.fetchFields({fields:[`displayName`,`formattedAddress`,`location`,`googleMapsURI`]});let a=new r({map:t,position:i.location,title:i.displayName}),o=document.createElement(`div`),s=document.createElement(`div`),c=document.createElement(`div`);if(s.textContent=i.formattedAddress||``,c.textContent=i.id,o.append(c,s),i.googleMapsURI){let e=document.createElement(`a`);e.href=i.googleMapsURI,e.target=`_blank`,e.textContent=`View Details on Google Maps`,o.appendChild(e)}n.setHeaderContent(i.displayName),n.setContent(o),n.open({anchor:a})}r(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t,n;async function r(){let{Map:r,InfoWindow:a}=await google.maps.importLibrary(`maps`);t=e.innerMap,n=new a,i()}async function i(){let[{Place:e},{AdvancedMarkerElement:r}]=await Promise.all([google.maps.importLibrary(`places`),google.maps.importLibrary(`marker`)]),i=new e({id:`ChIJyYB_SZVU2YARR-I1Jjf08F0`});await i.fetchFields({fields:[`displayName`,`formattedAddress`,`location`,`googleMapsURI`]});let a=new r({map:t,position:i.location,title:i.displayName}),o=document.createElement(`div`),s=document.createElement(`div`),c=document.createElement(`div`);if(s.textContent=i.formattedAddress||``,c.textContent=i.id,o.append(c,s),i.googleMapsURI){let e=document.createElement(`a`);e.href=i.googleMapsURI,e.target=`_blank`,e.textContent=`View Details on Google Maps`,o.appendChild(e)}n.setHeaderContent(i.displayName),n.setContent(o),n.open({anchor:a})}r(); \ No newline at end of file diff --git a/dist/samples/place-class/dist/index.html b/dist/samples/place-class/dist/index.html index 0e9601b97..159a5e883 100644 --- a/dist/samples/place-class/dist/index.html +++ b/dist/samples/place-class/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/place-class/docs/index.js b/dist/samples/place-class/docs/index.js index 4cb022801..c2fd90afe 100644 --- a/dist/samples/place-class/docs/index.js +++ b/dist/samples/place-class/docs/index.js @@ -20,8 +20,11 @@ async function initMap() { // [START maps_place_class_fetchfields] async function getPlaceDetails() { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); + // Use place ID to create a new Place instance. const place = new Place({ id: 'ChIJyYB_SZVU2YARR-I1Jjf08F0', // San Diego Zoo diff --git a/dist/samples/place-class/docs/index.ts b/dist/samples/place-class/docs/index.ts index e4c4aa703..b84438ce0 100644 --- a/dist/samples/place-class/docs/index.ts +++ b/dist/samples/place-class/docs/index.ts @@ -19,8 +19,11 @@ async function initMap() { // [START maps_place_class_fetchfields] async function getPlaceDetails() { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); + // Use place ID to create a new Place instance. const place = new Place({ id: 'ChIJyYB_SZVU2YARR-I1Jjf08F0', // San Diego Zoo diff --git a/dist/samples/place-class/jsfiddle/demo.js b/dist/samples/place-class/jsfiddle/demo.js index ddebed65e..eecdf0d1d 100644 --- a/dist/samples/place-class/jsfiddle/demo.js +++ b/dist/samples/place-class/jsfiddle/demo.js @@ -18,8 +18,11 @@ async function initMap() { } async function getPlaceDetails() { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); + // Use place ID to create a new Place instance. const place = new Place({ id: 'ChIJyYB_SZVU2YARR-I1Jjf08F0', // San Diego Zoo diff --git a/dist/samples/place-nearby-search/app/index.ts b/dist/samples/place-nearby-search/app/index.ts index fd811d85c..4a2ebfb7b 100644 --- a/dist/samples/place-nearby-search/app/index.ts +++ b/dist/samples/place-nearby-search/app/index.ts @@ -13,8 +13,10 @@ let typeSelect; let infoWindow; async function initMap() { - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [{ InfoWindow }, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ @@ -36,10 +38,15 @@ async function initMap() { } async function nearbySearch() { - const { Place, SearchNearbyRankPreference } = - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { spherical } = await google.maps.importLibrary('geometry'); + const [ + { Place, SearchNearbyRankPreference }, + { AdvancedMarkerElement }, + { spherical }, + ] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('geometry'), + ]); // [START maps_place_nearby_search_request] // Get bounds and radius to constrain search. center = mapElement.center; diff --git a/dist/samples/place-nearby-search/dist/assets/index-BGuDmFS2.js b/dist/samples/place-nearby-search/dist/assets/index-BGuDmFS2.js new file mode 100644 index 000000000..5958d3096 --- /dev/null +++ b/dist/samples/place-nearby-search/dist/assets/index-BGuDmFS2.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;document.querySelector(`gmp-advanced-marker`);var n,r,i;async function a(){let[{InfoWindow:n},{event:a}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);t=e.innerMap,t.setOptions({mapTypeControl:!1}),r=document.querySelector(`.type-select`),r.addEventListener(`change`,()=>{o()}),i=new n,a.addListenerOnce(t,`idle`,()=>{o()})}async function o(){let[{Place:i,SearchNearbyRankPreference:a},{AdvancedMarkerElement:o},{spherical:c}]=await Promise.all([google.maps.importLibrary(`places`),google.maps.importLibrary(`marker`),google.maps.importLibrary(`geometry`)]);n=e.center;let l=t.getBounds(),u=l.getNorthEast(),d=l.getSouthWest(),f=c.computeDistanceBetween(u,d),p=Math.min(f/2,5e4),m={fields:[`displayName`,`location`,`formattedAddress`,`googleMapsURI`],locationRestriction:{center:n,radius:p},includedPrimaryTypes:[r.value],maxResultCount:5,rankPreference:a.POPULARITY},{places:h}=await i.searchNearby(m);if(h.length){let{LatLngBounds:n}=await google.maps.importLibrary(`core`),r=new n;for(let t of e.querySelectorAll(`gmp-advanced-marker`))t.remove();h.forEach(e=>{if(!e.location)return;r.extend(e.location);let n=new o({map:t,position:e.location,title:e.displayName}),i=document.createElement(`div`),a=document.createElement(`div`);a.textContent=e.formattedAddress||``;let c=document.createElement(`div`);if(c.textContent=e.id,i.append(a,c),e.googleMapsURI){let t=document.createElement(`a`);t.href=e.googleMapsURI,t.target=`_blank`,t.textContent=`View Details on Google Maps`,i.appendChild(t)}n.addListener(`gmp-click`,()=>{t.panTo(e.location),s(e.displayName,i,n)})}),t.fitBounds(r,100)}else console.log(`No results`)}function s(e,t,n){i.setContent(t),i.setHeaderContent(e),i.open({anchor:n})}a(); \ No newline at end of file diff --git a/dist/samples/place-nearby-search/dist/assets/index-Cyoe_5hK.js b/dist/samples/place-nearby-search/dist/assets/index-Cyoe_5hK.js deleted file mode 100644 index d098066d8..000000000 --- a/dist/samples/place-nearby-search/dist/assets/index-Cyoe_5hK.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;document.querySelector(`gmp-advanced-marker`);var n,r,i;async function a(){let{InfoWindow:n}=await google.maps.importLibrary(`maps`),{event:a}=await google.maps.importLibrary(`core`);t=e.innerMap,t.setOptions({mapTypeControl:!1}),r=document.querySelector(`.type-select`),r.addEventListener(`change`,()=>{o()}),i=new n,a.addListenerOnce(t,`idle`,()=>{o()})}async function o(){let{Place:i,SearchNearbyRankPreference:a}=await google.maps.importLibrary(`places`),{AdvancedMarkerElement:o}=await google.maps.importLibrary(`marker`),{spherical:c}=await google.maps.importLibrary(`geometry`);n=e.center;let l=t.getBounds(),u=l.getNorthEast(),d=l.getSouthWest(),f=c.computeDistanceBetween(u,d),p=Math.min(f/2,5e4),m={fields:[`displayName`,`location`,`formattedAddress`,`googleMapsURI`],locationRestriction:{center:n,radius:p},includedPrimaryTypes:[r.value],maxResultCount:5,rankPreference:a.POPULARITY},{places:h}=await i.searchNearby(m);if(h.length){let{LatLngBounds:n}=await google.maps.importLibrary(`core`),r=new n;for(let t of e.querySelectorAll(`gmp-advanced-marker`))t.remove();h.forEach(e=>{if(!e.location)return;r.extend(e.location);let n=new o({map:t,position:e.location,title:e.displayName}),i=document.createElement(`div`),a=document.createElement(`div`);a.textContent=e.formattedAddress||``;let c=document.createElement(`div`);if(c.textContent=e.id,i.append(a,c),e.googleMapsURI){let t=document.createElement(`a`);t.href=e.googleMapsURI,t.target=`_blank`,t.textContent=`View Details on Google Maps`,i.appendChild(t)}n.addListener(`gmp-click`,()=>{t.panTo(e.location),s(e.displayName,i,n)})}),t.fitBounds(r,100)}else console.log(`No results`)}function s(e,t,n){i.setContent(t),i.setHeaderContent(e),i.open({anchor:n})}a(); \ No newline at end of file diff --git a/dist/samples/place-nearby-search/dist/index.html b/dist/samples/place-nearby-search/dist/index.html index f9274830d..35793f5bb 100644 --- a/dist/samples/place-nearby-search/dist/index.html +++ b/dist/samples/place-nearby-search/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/samples/place-nearby-search/docs/index.js b/dist/samples/place-nearby-search/docs/index.js index 4f977208c..6930bd581 100644 --- a/dist/samples/place-nearby-search/docs/index.js +++ b/dist/samples/place-nearby-search/docs/index.js @@ -14,8 +14,10 @@ let typeSelect; let infoWindow; async function initMap() { - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [{ InfoWindow }, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ @@ -37,10 +39,15 @@ async function initMap() { } async function nearbySearch() { - const { Place, SearchNearbyRankPreference } = - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { spherical } = await google.maps.importLibrary('geometry'); + const [ + { Place, SearchNearbyRankPreference }, + { AdvancedMarkerElement }, + { spherical }, + ] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('geometry'), + ]); // [START maps_place_nearby_search_request] // Get bounds and radius to constrain search. center = mapElement.center; diff --git a/dist/samples/place-nearby-search/docs/index.ts b/dist/samples/place-nearby-search/docs/index.ts index fd811d85c..4a2ebfb7b 100644 --- a/dist/samples/place-nearby-search/docs/index.ts +++ b/dist/samples/place-nearby-search/docs/index.ts @@ -13,8 +13,10 @@ let typeSelect; let infoWindow; async function initMap() { - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [{ InfoWindow }, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ @@ -36,10 +38,15 @@ async function initMap() { } async function nearbySearch() { - const { Place, SearchNearbyRankPreference } = - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { spherical } = await google.maps.importLibrary('geometry'); + const [ + { Place, SearchNearbyRankPreference }, + { AdvancedMarkerElement }, + { spherical }, + ] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('geometry'), + ]); // [START maps_place_nearby_search_request] // Get bounds and radius to constrain search. center = mapElement.center; diff --git a/dist/samples/place-nearby-search/jsfiddle/demo.js b/dist/samples/place-nearby-search/jsfiddle/demo.js index 2b192cc19..90232b12b 100644 --- a/dist/samples/place-nearby-search/jsfiddle/demo.js +++ b/dist/samples/place-nearby-search/jsfiddle/demo.js @@ -13,8 +13,10 @@ let typeSelect; let infoWindow; async function initMap() { - const { InfoWindow } = await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [{ InfoWindow }, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ @@ -36,10 +38,15 @@ async function initMap() { } async function nearbySearch() { - const { Place, SearchNearbyRankPreference } = - await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { spherical } = await google.maps.importLibrary('geometry'); + const [ + { Place, SearchNearbyRankPreference }, + { AdvancedMarkerElement }, + { spherical }, + ] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + google.maps.importLibrary('geometry'), + ]); // Get bounds and radius to constrain search. center = mapElement.center; diff --git a/dist/samples/place-text-search/app/index.ts b/dist/samples/place-text-search/app/index.ts index 9e0f42f50..4955443a5 100644 --- a/dist/samples/place-text-search/app/index.ts +++ b/dist/samples/place-text-search/app/index.ts @@ -10,8 +10,10 @@ let markers = {}; let infoWindow; async function initMap() { - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ Map, InfoWindow }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const center = { lat: 37.4161493, lng: -122.0812166 }; map = new Map(document.getElementById('map') as HTMLElement, { @@ -42,8 +44,10 @@ async function initMap() { } async function findPlaces(query) { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // [START maps_place_text_search_request] const request = { textQuery: query, diff --git a/dist/samples/place-text-search/dist/assets/index-DbOcgSN1.js b/dist/samples/place-text-search/dist/assets/index-DbOcgSN1.js deleted file mode 100644 index 958a0320a..000000000 --- a/dist/samples/place-text-search/dist/assets/index-DbOcgSN1.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t={},n;async function r(){let{Map:t,InfoWindow:r}=await google.maps.importLibrary(`maps`),{ControlPosition:a}=await google.maps.importLibrary(`core`);e=new t(document.getElementById(`map`),{center:{lat:37.4161493,lng:-122.0812166},zoom:11,mapTypeControl:!1,mapId:`DEMO_MAP_ID`});let o=document.getElementById(`text-input`),s=document.getElementById(`text-input-button`),c=document.getElementById(`text-input-card`);e.controls[a.TOP_LEFT].push(c),s.addEventListener(`click`,()=>{i(o.value)}),o.addEventListener(`keydown`,e=>{e.key===`Enter`&&i(o.value)}),n=new r}async function i(n){let{Place:r}=await google.maps.importLibrary(`places`),{AdvancedMarkerElement:i}=await google.maps.importLibrary(`marker`),o={textQuery:n,fields:[`displayName`,`location`,`businessStatus`],includedType:``,useStrictTypeFiltering:!0,locationBias:e.center,isOpenNow:!0,language:`en-US`,maxResultCount:8,minRating:1,region:`us`},{places:s}=await r.searchByText(o);if(s.length){let{LatLngBounds:n}=await google.maps.importLibrary(`core`),r=new n;for(let e in t)t[e].map=null;t={},s.forEach(n=>{let o=new i({map:e,position:n.location,title:n.displayName});t[n.id]=o,o.addListener(`gmp-click`,()=>{e.panTo(n.location),a(n.displayName,n.id,o)}),n.location!=null&&r.extend(n.location)}),e.fitBounds(r)}else console.log(`No results`)}async function a(t,r,i){n.setContent(r),n.setHeaderContent(t),n.open({map:e,anchor:i,shouldFocus:!1})}r(); \ No newline at end of file diff --git a/dist/samples/place-text-search/dist/assets/index-mL6U1TP6.js b/dist/samples/place-text-search/dist/assets/index-mL6U1TP6.js new file mode 100644 index 000000000..526e559f4 --- /dev/null +++ b/dist/samples/place-text-search/dist/assets/index-mL6U1TP6.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t={},n;async function r(){let[{Map:t,InfoWindow:r},{ControlPosition:a}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);e=new t(document.getElementById(`map`),{center:{lat:37.4161493,lng:-122.0812166},zoom:11,mapTypeControl:!1,mapId:`DEMO_MAP_ID`});let o=document.getElementById(`text-input`),s=document.getElementById(`text-input-button`),c=document.getElementById(`text-input-card`);e.controls[a.TOP_LEFT].push(c),s.addEventListener(`click`,()=>{i(o.value)}),o.addEventListener(`keydown`,e=>{e.key===`Enter`&&i(o.value)}),n=new r}async function i(n){let[{Place:r},{AdvancedMarkerElement:i}]=await Promise.all([google.maps.importLibrary(`places`),google.maps.importLibrary(`marker`)]),o={textQuery:n,fields:[`displayName`,`location`,`businessStatus`],includedType:``,useStrictTypeFiltering:!0,locationBias:e.center,isOpenNow:!0,language:`en-US`,maxResultCount:8,minRating:1,region:`us`},{places:s}=await r.searchByText(o);if(s.length){let{LatLngBounds:n}=await google.maps.importLibrary(`core`),r=new n;for(let e in t)t[e].map=null;t={},s.forEach(n=>{let o=new i({map:e,position:n.location,title:n.displayName});t[n.id]=o,o.addListener(`gmp-click`,()=>{e.panTo(n.location),a(n.displayName,n.id,o)}),n.location!=null&&r.extend(n.location)}),e.fitBounds(r)}else console.log(`No results`)}async function a(t,r,i){n.setContent(r),n.setHeaderContent(t),n.open({map:e,anchor:i,shouldFocus:!1})}r(); \ No newline at end of file diff --git a/dist/samples/place-text-search/dist/index.html b/dist/samples/place-text-search/dist/index.html index 678bb5aa8..0271ef0c9 100644 --- a/dist/samples/place-text-search/dist/index.html +++ b/dist/samples/place-text-search/dist/index.html @@ -9,7 +9,7 @@ Text Search - + diff --git a/dist/samples/place-text-search/docs/index.js b/dist/samples/place-text-search/docs/index.js index acb0cf124..c31817546 100644 --- a/dist/samples/place-text-search/docs/index.js +++ b/dist/samples/place-text-search/docs/index.js @@ -11,8 +11,10 @@ let markers = {}; let infoWindow; async function initMap() { - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ Map, InfoWindow }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const center = { lat: 37.4161493, lng: -122.0812166 }; map = new Map(document.getElementById('map'), { @@ -41,8 +43,10 @@ async function initMap() { } async function findPlaces(query) { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // [START maps_place_text_search_request] const request = { textQuery: query, diff --git a/dist/samples/place-text-search/docs/index.ts b/dist/samples/place-text-search/docs/index.ts index 9e0f42f50..4955443a5 100644 --- a/dist/samples/place-text-search/docs/index.ts +++ b/dist/samples/place-text-search/docs/index.ts @@ -10,8 +10,10 @@ let markers = {}; let infoWindow; async function initMap() { - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ Map, InfoWindow }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const center = { lat: 37.4161493, lng: -122.0812166 }; map = new Map(document.getElementById('map') as HTMLElement, { @@ -42,8 +44,10 @@ async function initMap() { } async function findPlaces(query) { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); // [START maps_place_text_search_request] const request = { textQuery: query, diff --git a/dist/samples/place-text-search/jsfiddle/demo.js b/dist/samples/place-text-search/jsfiddle/demo.js index 095e74a8b..3b17539ab 100644 --- a/dist/samples/place-text-search/jsfiddle/demo.js +++ b/dist/samples/place-text-search/jsfiddle/demo.js @@ -10,8 +10,10 @@ let markers = {}; let infoWindow; async function initMap() { - const { Map, InfoWindow } = await google.maps.importLibrary('maps'); - const { ControlPosition } = await google.maps.importLibrary('core'); + const [{ Map, InfoWindow }, { ControlPosition }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); const center = { lat: 37.4161493, lng: -122.0812166 }; map = new Map(document.getElementById('map'), { @@ -40,8 +42,10 @@ async function initMap() { } async function findPlaces(query) { - const { Place } = await google.maps.importLibrary('places'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Place }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('places'), + google.maps.importLibrary('marker'), + ]); const request = { textQuery: query, diff --git a/dist/samples/polyline-complex/app/index.ts b/dist/samples/polyline-complex/app/index.ts index 89a821158..f8bced9d4 100644 --- a/dist/samples/polyline-complex/app/index.ts +++ b/dist/samples/polyline-complex/app/index.ts @@ -17,8 +17,10 @@ let innerMap: google.maps.Map; async function initMap() { // Import the needed libraries. - const { Polyline } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Polyline }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); innerMap = mapElement.innerMap; diff --git a/dist/samples/polyline-complex/dist/assets/index-Dw7qkfh6.js b/dist/samples/polyline-complex/dist/assets/index-BOQVRdmz.js similarity index 62% rename from dist/samples/polyline-complex/dist/assets/index-Dw7qkfh6.js rename to dist/samples/polyline-complex/dist/assets/index-BOQVRdmz.js index b4230ec72..d97d23286 100644 --- a/dist/samples/polyline-complex/dist/assets/index-Dw7qkfh6.js +++ b/dist/samples/polyline-complex/dist/assets/index-BOQVRdmz.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t=document.querySelector(`gmp-map`),n;async function r(){let{Polyline:r}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:i}=await google.maps.importLibrary(`marker`);n=t.innerMap,e=new r({strokeColor:`#000000`,strokeOpacity:1,strokeWeight:3}),e.setMap(n),n.addListener(`click`,t=>{let r=t.latLng;if(!r)return;let a=e.getPath();a.push(r),new i({position:r,title:`#`+a.getLength(),map:n})})}r(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t=document.querySelector(`gmp-map`),n;async function r(){let[{Polyline:r},{AdvancedMarkerElement:i}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]);n=t.innerMap,e=new r({strokeColor:`#000000`,strokeOpacity:1,strokeWeight:3}),e.setMap(n),n.addListener(`click`,t=>{let r=t.latLng;if(!r)return;let a=e.getPath();a.push(r),new i({position:r,title:`#`+a.getLength(),map:n})})}r(); \ No newline at end of file diff --git a/dist/samples/polyline-complex/dist/index.html b/dist/samples/polyline-complex/dist/index.html index ece898c1a..deb75ec0f 100644 --- a/dist/samples/polyline-complex/dist/index.html +++ b/dist/samples/polyline-complex/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/polyline-complex/docs/index.js b/dist/samples/polyline-complex/docs/index.js index ae04893b7..528ed36a0 100644 --- a/dist/samples/polyline-complex/docs/index.js +++ b/dist/samples/polyline-complex/docs/index.js @@ -18,8 +18,10 @@ let innerMap; async function initMap() { // Import the needed libraries. - const { Polyline } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Polyline }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); innerMap = mapElement.innerMap; diff --git a/dist/samples/polyline-complex/docs/index.ts b/dist/samples/polyline-complex/docs/index.ts index 89a821158..f8bced9d4 100644 --- a/dist/samples/polyline-complex/docs/index.ts +++ b/dist/samples/polyline-complex/docs/index.ts @@ -17,8 +17,10 @@ let innerMap: google.maps.Map; async function initMap() { // Import the needed libraries. - const { Polyline } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Polyline }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); innerMap = mapElement.innerMap; diff --git a/dist/samples/polyline-complex/jsfiddle/demo.js b/dist/samples/polyline-complex/jsfiddle/demo.js index 1765717a6..f0590fc8d 100644 --- a/dist/samples/polyline-complex/jsfiddle/demo.js +++ b/dist/samples/polyline-complex/jsfiddle/demo.js @@ -17,8 +17,10 @@ let innerMap; async function initMap() { // Import the needed libraries. - const { Polyline } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Polyline }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); innerMap = mapElement.innerMap; diff --git a/dist/samples/routes-get-alternatives/app/index.ts b/dist/samples/routes-get-alternatives/app/index.ts index 3c9e46b61..ede4fe92e 100644 --- a/dist/samples/routes-get-alternatives/app/index.ts +++ b/dist/samples/routes-get-alternatives/app/index.ts @@ -11,8 +11,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-get-alternatives/dist/assets/index-DUkkR9dP.js b/dist/samples/routes-get-alternatives/dist/assets/index-DUkkR9dP.js new file mode 100644 index 000000000..7b66d776e --- /dev/null +++ b/dist/samples/routes-get-alternatives/dist/assets/index-DUkkR9dP.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=[],t=document.querySelector(`gmp-map`),n;async function r(){let[,{event:e}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);n=t.innerMap,n.setOptions({mapTypeControl:!1,mapId:`DEMO_MAP_ID`}),e.addListenerOnce(n,`idle`,()=>{i()})}async function i(){let[{Route:e,RouteLabel:t}]=await Promise.all([google.maps.importLibrary(`routes`)]),r=await e.computeRoutes({origin:`San Francisco, CA`,destination:`Sunset Dr Pacific Grove, CA 93950`,travelMode:`DRIVING`,computeAlternativeRoutes:!0,fields:[`path`,`routeLabels`,`viewport`]});if(!r.routes||r.routes.length===0){console.warn(`No routes found`);return}let i;for(let e of r.routes)e.routeLabels?.includes(t.DEFAULT_ROUTE)?i=e:a(e,!1);i&&(a(i,!0),await i.createWaypointAdvancedMarkers({map:n}),n.fitBounds(i.viewport,50),n.setHeading(70)),console.log(`Response:\n ${JSON.stringify(r,null,2)}`)}function a(t,r){e=e.concat(t.createPolylines({polylineOptions:r?{map:n,strokeWeight:5}:{map:n,strokeColor:`#669DF6`,strokeOpacity:.5,strokeWeight:5},colorScheme:n.get(`colorScheme`)}))}r(); \ No newline at end of file diff --git a/dist/samples/routes-get-alternatives/dist/assets/index-Ttq-u_Qw.js b/dist/samples/routes-get-alternatives/dist/assets/index-Ttq-u_Qw.js deleted file mode 100644 index 059ca5f27..000000000 --- a/dist/samples/routes-get-alternatives/dist/assets/index-Ttq-u_Qw.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=[],t=document.querySelector(`gmp-map`),n;async function r(){await google.maps.importLibrary(`maps`);let{event:e}=await google.maps.importLibrary(`core`);n=t.innerMap,n.setOptions({mapTypeControl:!1,mapId:`DEMO_MAP_ID`}),e.addListenerOnce(n,`idle`,()=>{i()})}async function i(){let[{Route:e,RouteLabel:t}]=await Promise.all([google.maps.importLibrary(`routes`)]),r=await e.computeRoutes({origin:`San Francisco, CA`,destination:`Sunset Dr Pacific Grove, CA 93950`,travelMode:`DRIVING`,computeAlternativeRoutes:!0,fields:[`path`,`routeLabels`,`viewport`]});if(!r.routes||r.routes.length===0){console.warn(`No routes found`);return}let i;for(let e of r.routes)e.routeLabels?.includes(t.DEFAULT_ROUTE)?i=e:a(e,!1);i&&(a(i,!0),await i.createWaypointAdvancedMarkers({map:n}),n.fitBounds(i.viewport,50),n.setHeading(70)),console.log(`Response:\n ${JSON.stringify(r,null,2)}`)}function a(t,r){e=e.concat(t.createPolylines({polylineOptions:r?{map:n,strokeWeight:5}:{map:n,strokeColor:`#669DF6`,strokeOpacity:.5,strokeWeight:5},colorScheme:n.get(`colorScheme`)}))}r(); \ No newline at end of file diff --git a/dist/samples/routes-get-alternatives/dist/index.html b/dist/samples/routes-get-alternatives/dist/index.html index 346415594..22ff1b5c5 100644 --- a/dist/samples/routes-get-alternatives/dist/index.html +++ b/dist/samples/routes-get-alternatives/dist/index.html @@ -9,7 +9,7 @@ Get directions - + diff --git a/dist/samples/routes-get-alternatives/docs/index.js b/dist/samples/routes-get-alternatives/docs/index.js index 583d452a1..b18263b56 100644 --- a/dist/samples/routes-get-alternatives/docs/index.js +++ b/dist/samples/routes-get-alternatives/docs/index.js @@ -12,8 +12,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-get-alternatives/docs/index.ts b/dist/samples/routes-get-alternatives/docs/index.ts index 3c9e46b61..ede4fe92e 100644 --- a/dist/samples/routes-get-alternatives/docs/index.ts +++ b/dist/samples/routes-get-alternatives/docs/index.ts @@ -11,8 +11,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-get-alternatives/jsfiddle/demo.js b/dist/samples/routes-get-alternatives/jsfiddle/demo.js index 8ebde5f74..7f5895ca8 100644 --- a/dist/samples/routes-get-alternatives/jsfiddle/demo.js +++ b/dist/samples/routes-get-alternatives/jsfiddle/demo.js @@ -12,8 +12,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-markers/app/index.ts b/dist/samples/routes-markers/app/index.ts index 0657505e6..d3a403bf5 100644 --- a/dist/samples/routes-markers/app/index.ts +++ b/dist/samples/routes-markers/app/index.ts @@ -11,8 +11,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-markers/dist/assets/index-Ce8Ot66-.js b/dist/samples/routes-markers/dist/assets/index-Ce8Ot66-.js deleted file mode 100644 index 12b971631..000000000 --- a/dist/samples/routes-markers/dist/assets/index-Ce8Ot66-.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=[],t=document.querySelector(`gmp-map`),n;async function r(){await google.maps.importLibrary(`maps`);let{event:e}=await google.maps.importLibrary(`core`);n=t.innerMap,n.setOptions({mapTypeControl:!1,mapId:`DEMO_MAP_ID`}),e.addListenerOnce(n,`idle`,()=>{i()})}async function i(){let[{Route:t},{PinElement:r}]=await Promise.all([google.maps.importLibrary(`routes`),google.maps.importLibrary(`marker`)]),i=await t.computeRoutes({origin:`Parking lot, Christmas Tree Point Rd, San Francisco, CA 94131`,destination:`100 Spinnaker Dr, Sausalito, CA 94965`,intermediates:[{location:`300 Finley Rd San Francisco, CA 94129`}],travelMode:`DRIVING`,fields:[`path`,`legs`,`viewport`]});if(!i.routes||i.routes.length===0){console.warn(`No routes found`);return}function a(e,t){let{index:i,totalMarkers:a,leg:o}=t;return i===0?{...e,map:n,content:new r({glyphText:(i+1).toString(),glyphColor:`white`,background:`green`,borderColor:`green`}).element}:i===0||i===a-1?i===a-1?{...e,map:n,content:new r({glyphText:(i+1).toString(),glyphColor:`white`,background:`red`,borderColor:`red`}).element}:{...e,map:n}:{...e,map:n,content:new r({glyphText:(i+1).toString(),glyphColor:`white`,background:`blue`,borderColor:`blue`}).element}}await i.routes[0].createWaypointAdvancedMarkers(a),n.fitBounds(i.routes[0].viewport),n.setHeading(270),e=i.routes[0].createPolylines(),e.forEach(e=>e.setMap(n))}r(); \ No newline at end of file diff --git a/dist/samples/routes-markers/dist/assets/index-R932pqys.js b/dist/samples/routes-markers/dist/assets/index-R932pqys.js new file mode 100644 index 000000000..9d9ff8881 --- /dev/null +++ b/dist/samples/routes-markers/dist/assets/index-R932pqys.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=[],t=document.querySelector(`gmp-map`),n;async function r(){let[,{event:e}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`core`)]);n=t.innerMap,n.setOptions({mapTypeControl:!1,mapId:`DEMO_MAP_ID`}),e.addListenerOnce(n,`idle`,()=>{i()})}async function i(){let[{Route:t},{PinElement:r}]=await Promise.all([google.maps.importLibrary(`routes`),google.maps.importLibrary(`marker`)]),i=await t.computeRoutes({origin:`Parking lot, Christmas Tree Point Rd, San Francisco, CA 94131`,destination:`100 Spinnaker Dr, Sausalito, CA 94965`,intermediates:[{location:`300 Finley Rd San Francisco, CA 94129`}],travelMode:`DRIVING`,fields:[`path`,`legs`,`viewport`]});if(!i.routes||i.routes.length===0){console.warn(`No routes found`);return}function a(e,t){let{index:i,totalMarkers:a,leg:o}=t;return i===0?{...e,map:n,content:new r({glyphText:(i+1).toString(),glyphColor:`white`,background:`green`,borderColor:`green`}).element}:i===0||i===a-1?i===a-1?{...e,map:n,content:new r({glyphText:(i+1).toString(),glyphColor:`white`,background:`red`,borderColor:`red`}).element}:{...e,map:n}:{...e,map:n,content:new r({glyphText:(i+1).toString(),glyphColor:`white`,background:`blue`,borderColor:`blue`}).element}}await i.routes[0].createWaypointAdvancedMarkers(a),n.fitBounds(i.routes[0].viewport),n.setHeading(270),e=i.routes[0].createPolylines(),e.forEach(e=>e.setMap(n))}r(); \ No newline at end of file diff --git a/dist/samples/routes-markers/dist/index.html b/dist/samples/routes-markers/dist/index.html index eb602359c..e191033c9 100644 --- a/dist/samples/routes-markers/dist/index.html +++ b/dist/samples/routes-markers/dist/index.html @@ -9,7 +9,7 @@ Get directions - + diff --git a/dist/samples/routes-markers/docs/index.js b/dist/samples/routes-markers/docs/index.js index 6dcdb5052..babcd9eb3 100644 --- a/dist/samples/routes-markers/docs/index.js +++ b/dist/samples/routes-markers/docs/index.js @@ -12,8 +12,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-markers/docs/index.ts b/dist/samples/routes-markers/docs/index.ts index 0657505e6..d3a403bf5 100644 --- a/dist/samples/routes-markers/docs/index.ts +++ b/dist/samples/routes-markers/docs/index.ts @@ -11,8 +11,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/routes-markers/jsfiddle/demo.js b/dist/samples/routes-markers/jsfiddle/demo.js index c122e2e28..f2591eba8 100644 --- a/dist/samples/routes-markers/jsfiddle/demo.js +++ b/dist/samples/routes-markers/jsfiddle/demo.js @@ -12,8 +12,10 @@ let innerMap; // Initialize and add the map. async function initMap() { // Request the needed libraries. - await google.maps.importLibrary('maps'); - const { event } = await google.maps.importLibrary('core'); + const [, { event }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('core'), + ]); innerMap = mapElement.innerMap; innerMap.setOptions({ diff --git a/dist/samples/streetview-overlays/app/index.ts b/dist/samples/streetview-overlays/app/index.ts index 6a65682bc..e658e224e 100644 --- a/dist/samples/streetview-overlays/app/index.ts +++ b/dist/samples/streetview-overlays/app/index.ts @@ -10,8 +10,10 @@ let innerMap: google.maps.Map; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { Marker } = await google.maps.importLibrary('marker'); + const [{ Map }, { Marker }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set the location of Astor Place. const astorPlace = { lat: 40.729884, lng: -73.990988 }; diff --git a/dist/samples/streetview-overlays/dist/assets/index-B7R9Ly3G.js b/dist/samples/streetview-overlays/dist/assets/index-B7R9Ly3G.js new file mode 100644 index 000000000..80f6daa53 --- /dev/null +++ b/dist/samples/streetview-overlays/dist/assets/index-B7R9Ly3G.js @@ -0,0 +1 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t;async function n(){let[{Map:n},{Marker:i}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]),a={lat:40.729884,lng:-73.990988};t=document.querySelector(`gmp-map`).innerMap,document.getElementById(`streetview-toggle-button`).addEventListener(`click`,r);let o=document.createElement(`img`);o.src=new URL(``+new URL(`../cafe_icon.svg`,import.meta.url).href,``+import.meta.url).href;let s=document.createElement(`img`);s.src=new URL(``+new URL(`../bank_icon.svg`,import.meta.url).href,``+import.meta.url).href;let c=document.createElement(`img`);c.src=new URL(``+new URL(`../bus_icon.svg`,import.meta.url).href,``+import.meta.url).href,new i({position:{lat:40.730031,lng:-73.991428},map:t,title:`Cafe`,icon:o.src}),new i({position:{lat:40.729681,lng:-73.991138},map:t,title:`Bank`,icon:s.src}),new i({position:{lat:40.729559,lng:-73.990741},map:t,title:`Bus Stop`,icon:c.src}),e=t.getStreetView(),e.setPosition(a),e.setPov({heading:265,pitch:0})}function r(){e.getVisible()==0?e.setVisible(!0):e.setVisible(!1)}n(); \ No newline at end of file diff --git a/dist/samples/streetview-overlays/dist/assets/index-Bre2hY9N.js b/dist/samples/streetview-overlays/dist/assets/index-Bre2hY9N.js deleted file mode 100644 index 58b6fbd72..000000000 --- a/dist/samples/streetview-overlays/dist/assets/index-Bre2hY9N.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t;async function n(){let{Map:n}=await google.maps.importLibrary(`maps`),{Marker:i}=await google.maps.importLibrary(`marker`),a={lat:40.729884,lng:-73.990988};t=document.querySelector(`gmp-map`).innerMap,document.getElementById(`streetview-toggle-button`).addEventListener(`click`,r);let o=document.createElement(`img`);o.src=new URL(``+new URL(`../cafe_icon.svg`,import.meta.url).href,``+import.meta.url).href;let s=document.createElement(`img`);s.src=new URL(``+new URL(`../bank_icon.svg`,import.meta.url).href,``+import.meta.url).href;let c=document.createElement(`img`);c.src=new URL(``+new URL(`../bus_icon.svg`,import.meta.url).href,``+import.meta.url).href,new i({position:{lat:40.730031,lng:-73.991428},map:t,title:`Cafe`,icon:o.src}),new i({position:{lat:40.729681,lng:-73.991138},map:t,title:`Bank`,icon:s.src}),new i({position:{lat:40.729559,lng:-73.990741},map:t,title:`Bus Stop`,icon:c.src}),e=t.getStreetView(),e.setPosition(a),e.setPov({heading:265,pitch:0})}function r(){e.getVisible()==0?e.setVisible(!0):e.setVisible(!1)}n(); \ No newline at end of file diff --git a/dist/samples/streetview-overlays/dist/index.html b/dist/samples/streetview-overlays/dist/index.html index dd3b7f0d5..5a1b920eb 100644 --- a/dist/samples/streetview-overlays/dist/index.html +++ b/dist/samples/streetview-overlays/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/samples/streetview-overlays/docs/index.js b/dist/samples/streetview-overlays/docs/index.js index 5bd8d5f9f..97102a426 100644 --- a/dist/samples/streetview-overlays/docs/index.js +++ b/dist/samples/streetview-overlays/docs/index.js @@ -10,8 +10,10 @@ let innerMap; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { Marker } = await google.maps.importLibrary('marker'); + const [{ Map }, { Marker }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set the location of Astor Place. const astorPlace = { lat: 40.729884, lng: -73.990988 }; diff --git a/dist/samples/streetview-overlays/docs/index.ts b/dist/samples/streetview-overlays/docs/index.ts index 6a65682bc..e658e224e 100644 --- a/dist/samples/streetview-overlays/docs/index.ts +++ b/dist/samples/streetview-overlays/docs/index.ts @@ -10,8 +10,10 @@ let innerMap: google.maps.Map; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { Marker } = await google.maps.importLibrary('marker'); + const [{ Map }, { Marker }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set the location of Astor Place. const astorPlace = { lat: 40.729884, lng: -73.990988 }; diff --git a/dist/samples/streetview-overlays/jsfiddle/demo.js b/dist/samples/streetview-overlays/jsfiddle/demo.js index aee700c2c..71546ef20 100644 --- a/dist/samples/streetview-overlays/jsfiddle/demo.js +++ b/dist/samples/streetview-overlays/jsfiddle/demo.js @@ -9,8 +9,10 @@ let innerMap; async function initMap() { // Request needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { Marker } = await google.maps.importLibrary('marker'); + const [{ Map }, { Marker }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Set the location of Astor Place. const astorPlace = { lat: 40.729884, lng: -73.990988 }; diff --git a/dist/samples/test-example/app/index.ts b/dist/samples/test-example/app/index.ts index 67055e8d3..d38863109 100644 --- a/dist/samples/test-example/app/index.ts +++ b/dist/samples/test-example/app/index.ts @@ -20,8 +20,10 @@ let center; async function initMap() { // [START maps_test_example_instantiate_map] // Request the needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the inner map from the gmp-map element. innerMap = mapElement.innerMap; diff --git a/dist/samples/test-example/dist/assets/index-DgAwGafp.js b/dist/samples/test-example/dist/assets/index-BNqn7gla.js similarity index 68% rename from dist/samples/test-example/dist/assets/index-DgAwGafp.js rename to dist/samples/test-example/dist/assets/index-BNqn7gla.js index 6da052669..73f41917a 100644 --- a/dist/samples/test-example/dist/assets/index-DgAwGafp.js +++ b/dist/samples/test-example/dist/assets/index-BNqn7gla.js @@ -1 +1 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;document.querySelector(`gmp-advanced-marker`);var n;async function r(){let{Map:r}=await google.maps.importLibrary(`maps`),{AdvancedMarkerElement:i}=await google.maps.importLibrary(`marker`);t=e.innerMap,t.setOptions({mapTypeControl:!1}),n=t.getCenter(),new i({map:t,position:n,title:`Uluru`}),console.log(`Say there Mac, why'd you choose me to test this change?`)}r(); \ No newline at end of file +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=document.querySelector(`gmp-map`),t;document.querySelector(`gmp-advanced-marker`);var n;async function r(){let[{Map:r},{AdvancedMarkerElement:i}]=await Promise.all([google.maps.importLibrary(`maps`),google.maps.importLibrary(`marker`)]);t=e.innerMap,t.setOptions({mapTypeControl:!1}),n=t.getCenter(),new i({map:t,position:n,title:`Uluru`}),console.log(`Say there Mac, why'd you choose me to test this change?`)}r(); \ No newline at end of file diff --git a/dist/samples/test-example/dist/index.html b/dist/samples/test-example/dist/index.html index a03617c98..58033bd29 100644 --- a/dist/samples/test-example/dist/index.html +++ b/dist/samples/test-example/dist/index.html @@ -15,7 +15,7 @@ - + diff --git a/dist/samples/test-example/docs/index.js b/dist/samples/test-example/docs/index.js index e18ad59af..d71fe65e8 100644 --- a/dist/samples/test-example/docs/index.js +++ b/dist/samples/test-example/docs/index.js @@ -21,8 +21,10 @@ let center; async function initMap() { // [START maps_test_example_instantiate_map] // Request the needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the inner map from the gmp-map element. innerMap = mapElement.innerMap; diff --git a/dist/samples/test-example/docs/index.ts b/dist/samples/test-example/docs/index.ts index 67055e8d3..d38863109 100644 --- a/dist/samples/test-example/docs/index.ts +++ b/dist/samples/test-example/docs/index.ts @@ -20,8 +20,10 @@ let center; async function initMap() { // [START maps_test_example_instantiate_map] // Request the needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the inner map from the gmp-map element. innerMap = mapElement.innerMap; diff --git a/dist/samples/test-example/jsfiddle/demo.js b/dist/samples/test-example/jsfiddle/demo.js index 56352405d..524bdad29 100644 --- a/dist/samples/test-example/jsfiddle/demo.js +++ b/dist/samples/test-example/jsfiddle/demo.js @@ -19,8 +19,10 @@ let center; async function initMap() { // Request the needed libraries. - const { Map } = await google.maps.importLibrary('maps'); - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); + const [{ Map }, { AdvancedMarkerElement }] = await Promise.all([ + google.maps.importLibrary('maps'), + google.maps.importLibrary('marker'), + ]); // Get the inner map from the gmp-map element. innerMap = mapElement.innerMap; diff --git a/dist/samples/weather-api-current-compact/app/index.ts b/dist/samples/weather-api-current-compact/app/index.ts index cfa99e1d6..94e5444e7 100644 --- a/dist/samples/weather-api-current-compact/app/index.ts +++ b/dist/samples/weather-api-current-compact/app/index.ts @@ -116,8 +116,10 @@ async function createAndAddMarker( location: { name: string; lat: number; lng: number }, markerType: 'initial' | 'button' | 'dynamic' ): Promise { - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [{ AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); const weatherWidget = document.createElement( 'simple-weather-widget' ) as SimpleWeatherWidget; diff --git a/dist/samples/weather-api-current-compact/dist/assets/index-PcBg0ySC.js b/dist/samples/weather-api-current-compact/dist/assets/index-COgdpiAi.js similarity index 74% rename from dist/samples/weather-api-current-compact/dist/assets/index-PcBg0ySC.js rename to dist/samples/weather-api-current-compact/dist/assets/index-COgdpiAi.js index 81d3f435b..77519f347 100644 --- a/dist/samples/weather-api-current-compact/dist/assets/index-PcBg0ySC.js +++ b/dist/samples/weather-api-current-compact/dist/assets/index-COgdpiAi.js @@ -143,4 +143,4 @@
- `}set data(e){let t=this.shadowRoot.getElementById(`condition-icon`),n=this.shadowRoot.getElementById(`temperature`),r=this.shadowRoot.getElementById(`rain-probability`),i=this.shadowRoot.getElementById(`rain-qpf`),a=this.shadowRoot.getElementById(`rain-details`);if(!e||e.error){t.style.display=`none`,a.style.display=`none`,e&&e.error?(n.textContent=e.error,n.classList.add(`error-message`)):(n.textContent=`N/A`,n.classList.remove(`error-message`));return}let o=e.daytimeForecast||e.nighttimeForecast,s,c,l,u;if(o){let t=e;s=t.maxTemperature?.degrees,c=t.daytimeForecast?.weatherCondition?.iconBaseUri||t.nighttimeForecast?.weatherCondition?.iconBaseUri,l=t.precipitation?.probability?.percent,u=t.precipitation?.qpf?.quantity}else{let t=e;s=t.temperature?.degrees,c=t.weatherCondition?.iconBaseUri,l=t.precipitation?.probability?.percent,u=t.currentConditionsHistory?.qpf?.quantity===void 0?t.precipitation?.qpf?.quantity:t.currentConditionsHistory.qpf.quantity}let d=``;d=c?`${c}.svg`:`/icons/cloud-cover-white.svg`,t.style.display=`none`,t.onload=()=>{t.style.display=`inline-block`},t.onerror=()=>{console.error(`Failed to load weather icon:`,d),t.style.display=`none`},t.src=d,n.textContent=`${s===void 0?`N/A`:s.toFixed(0)}°C`,n.classList.remove(`error-message`),l==null?r.textContent=`0%`:r.textContent=`${l}%`,u==null?i.textContent=`0.0mm`:i.textContent=`${u.toFixed(1)}mm`}setMode(e){e===`dark`?this.classList.add(`dark-mode`):this.classList.remove(`dark-mode`)}};customElements.define(`simple-weather-widget`,e);var t=`https://weather.googleapis.com/v1/currentConditions:lookup`,n=`AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8`,r=`c306b3c6dd3ed8d9`,i=`6b73a9fe7e831a00`,a,o=null,s=[],c=!1;async function l(){google.maps.importLibrary(`marker`);let{Map:e}=await google.maps.importLibrary(`maps`);a=new e(document.getElementById(`map`),{center:{lat:48.8566,lng:2.3522},zoom:6,minZoom:5,disableDefaultUI:!0,mapId:`c306b3c6dd3ed8d9`,clickableIcons:!1});let t=a.getCenter();t&&await u({name:`Initial Location`,lat:t.lat(),lng:t.lng()},`dynamic`),a.addListener(`click`,async e=>{let t=e.domEvent.target,n=!1;for(;t;){if(t.tagName===`SIMPLE-WEATHER-WIDGET`||t.classList.contains(`gm-control-active`)){n=!0;break}t=t.parentElement}if(!n&&e.latLng){if(o){let e=o.shadowRoot.getElementById(`rain-details`);e.style.display=`none`,o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`);let t=s.find(e=>e.content===o);t&&(t.zIndex=null),o=null}let t=s.findIndex(e=>e.markerType===`dynamic`);t!==-1&&(s[t].map=null,s.splice(t,1)),await u({name:`Clicked Location`,lat:e.latLng.lat(),lng:e.latLng.lng()},`dynamic`)}})}async function u(e,t){let{AdvancedMarkerElement:n}=await google.maps.importLibrary(`marker`),{LatLng:r}=await google.maps.importLibrary(`core`),i=document.createElement(`simple-weather-widget`);document.getElementById(`map`).classList.contains(`dark-mode`)&&i.setMode(`dark`);let c=new n({map:a,position:{lat:e.lat,lng:e.lng},content:i,title:e.name,gmpClickable:!0});c.markerType=t,h(c,i,new r(e.lat,e.lng)),c.addEventListener(`gmp-click`,()=>{let e=i.shadowRoot.querySelector(`.widget-container`);if(o&&o!==i){o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`);let e=s.find(e=>e.content===o);e&&(e.zIndex=null)}e.classList.toggle(`highlight`),e.classList.contains(`highlight`)?(o=i,c.zIndex=1):(o=null,c.zIndex=null)}),s.push(c)}async function d(){let e=document.getElementById(`map`);e.classList.toggle(`dark-mode`);let t=document.getElementById(`mode-toggle`);t&&(e.classList.contains(`dark-mode`)?t.textContent=`Light Mode`:t.textContent=`Dark Mode`),s.forEach(e=>{e.map=null});let{Map:n}=await google.maps.importLibrary(`maps`);a=new n(e,{center:a.getCenter(),zoom:a.getZoom(),minZoom:5,disableDefaultUI:!0,mapId:e.classList.contains(`dark-mode`)?i:r,clickableIcons:!1});let c=[...s];s=[];for(let e of c){e.map=a;let t=e.content;document.getElementById(`map`).classList.contains(`dark-mode`)?t.setMode(`dark`):t.setMode(`light`),s.push(e)}a.addListener(`click`,async e=>{let t=e.domEvent.target,n=!1;for(;t;){if(t.tagName===`SIMPLE-WEATHER-WIDGET`||t.classList.contains(`gm-control-active`)){n=!0;break}t=t.parentElement}if(!n&&e.latLng){if(o){let e=o.shadowRoot.getElementById(`rain-details`);e.style.display=`none`,o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`);let t=s.find(e=>e.content===o);t&&(t.zIndex=null),o=null}let t=s.findIndex(e=>e.markerType===`dynamic`);t!==-1&&(s[t].map=null,s.splice(t,1)),await u({name:`Clicked Location`,lat:e.latLng.lat(),lng:e.latLng.lng()},`dynamic`)}})}var f=[{name:`London`,lat:51.5074,lng:-.1278},{name:`Brussels`,lat:50.8503,lng:4.3517},{name:`Luxembourg`,lat:49.8153,lng:6.1296},{name:`Amsterdam`,lat:52.3676,lng:4.9041},{name:`Berlin`,lat:52.52,lng:13.405},{name:`Rome`,lat:41.9028,lng:12.4964},{name:`Geneva`,lat:46.2044,lng:6.14324},{name:`Barcelona`,lat:41.3874,lng:-2.1686},{name:`Milan`,lat:45.4685,lng:9.1824}];async function p(){let{AdvancedMarkerElement:e}=await google.maps.importLibrary(`marker`);for(let e of f)await u(e,`button`)}function m(){if(o){let e=s.find(e=>e.content===o&&e.markerType===`button`);if(e){let t=o.shadowRoot.getElementById(`rain-details`);t.style.display=`none`,o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`),e.zIndex=null,o=null}}s.filter(e=>e.markerType===`button`).forEach(e=>{e.map=null;let t=s.indexOf(e);t>-1&&s.splice(t,1)})}async function h(e,r,i){let a=`${t}?key=${n}&location.latitude=${i.lat()}&location.longitude=${i.lng()}`;try{let e=await fetch(a);if(e.ok){let t=await e.json();console.log(`Weather data fetched for marker:`,t),r.data=t}else{let t=await e.json();if(console.error(`API error response:`,t),e.status===404&&t?.error?.status===`NOT_FOUND`)r.data={error:`Location not supported`};else throw Error(`HTTP error! status: ${e.status}`)}}catch(e){console.error(`Error fetching weather data for marker:`,e),r.data={error:`Failed to fetch weather data`}}}l(),customElements.whenDefined(`simple-weather-widget`).then(()=>{let e=document.getElementById(`mode-toggle`);e&&e.addEventListener(`click`,()=>{d()});let t=document.getElementById(`load-markers-button`);t&&t.addEventListener(`click`,()=>{c?(m(),c=!1,t.textContent=`Load Markers`):(p(),c=!0,t.textContent=`Remove Markers`)})}); \ No newline at end of file + `}set data(e){let t=this.shadowRoot.getElementById(`condition-icon`),n=this.shadowRoot.getElementById(`temperature`),r=this.shadowRoot.getElementById(`rain-probability`),i=this.shadowRoot.getElementById(`rain-qpf`),a=this.shadowRoot.getElementById(`rain-details`);if(!e||e.error){t.style.display=`none`,a.style.display=`none`,e&&e.error?(n.textContent=e.error,n.classList.add(`error-message`)):(n.textContent=`N/A`,n.classList.remove(`error-message`));return}let o=e.daytimeForecast||e.nighttimeForecast,s,c,l,u;if(o){let t=e;s=t.maxTemperature?.degrees,c=t.daytimeForecast?.weatherCondition?.iconBaseUri||t.nighttimeForecast?.weatherCondition?.iconBaseUri,l=t.precipitation?.probability?.percent,u=t.precipitation?.qpf?.quantity}else{let t=e;s=t.temperature?.degrees,c=t.weatherCondition?.iconBaseUri,l=t.precipitation?.probability?.percent,u=t.currentConditionsHistory?.qpf?.quantity===void 0?t.precipitation?.qpf?.quantity:t.currentConditionsHistory.qpf.quantity}let d=``;d=c?`${c}.svg`:`/icons/cloud-cover-white.svg`,t.style.display=`none`,t.onload=()=>{t.style.display=`inline-block`},t.onerror=()=>{console.error(`Failed to load weather icon:`,d),t.style.display=`none`},t.src=d,n.textContent=`${s===void 0?`N/A`:s.toFixed(0)}°C`,n.classList.remove(`error-message`),l==null?r.textContent=`0%`:r.textContent=`${l}%`,u==null?i.textContent=`0.0mm`:i.textContent=`${u.toFixed(1)}mm`}setMode(e){e===`dark`?this.classList.add(`dark-mode`):this.classList.remove(`dark-mode`)}};customElements.define(`simple-weather-widget`,e);var t=`https://weather.googleapis.com/v1/currentConditions:lookup`,n=`AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8`,r=`c306b3c6dd3ed8d9`,i=`6b73a9fe7e831a00`,a,o=null,s=[],c=!1;async function l(){google.maps.importLibrary(`marker`);let{Map:e}=await google.maps.importLibrary(`maps`);a=new e(document.getElementById(`map`),{center:{lat:48.8566,lng:2.3522},zoom:6,minZoom:5,disableDefaultUI:!0,mapId:`c306b3c6dd3ed8d9`,clickableIcons:!1});let t=a.getCenter();t&&await u({name:`Initial Location`,lat:t.lat(),lng:t.lng()},`dynamic`),a.addListener(`click`,async e=>{let t=e.domEvent.target,n=!1;for(;t;){if(t.tagName===`SIMPLE-WEATHER-WIDGET`||t.classList.contains(`gm-control-active`)){n=!0;break}t=t.parentElement}if(!n&&e.latLng){if(o){let e=o.shadowRoot.getElementById(`rain-details`);e.style.display=`none`,o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`);let t=s.find(e=>e.content===o);t&&(t.zIndex=null),o=null}let t=s.findIndex(e=>e.markerType===`dynamic`);t!==-1&&(s[t].map=null,s.splice(t,1)),await u({name:`Clicked Location`,lat:e.latLng.lat(),lng:e.latLng.lng()},`dynamic`)}})}async function u(e,t){let[{AdvancedMarkerElement:n},{LatLng:r}]=await Promise.all([google.maps.importLibrary(`marker`),google.maps.importLibrary(`core`)]),i=document.createElement(`simple-weather-widget`);document.getElementById(`map`).classList.contains(`dark-mode`)&&i.setMode(`dark`);let c=new n({map:a,position:{lat:e.lat,lng:e.lng},content:i,title:e.name,gmpClickable:!0});c.markerType=t,h(c,i,new r(e.lat,e.lng)),c.addEventListener(`gmp-click`,()=>{let e=i.shadowRoot.querySelector(`.widget-container`);if(o&&o!==i){o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`);let e=s.find(e=>e.content===o);e&&(e.zIndex=null)}e.classList.toggle(`highlight`),e.classList.contains(`highlight`)?(o=i,c.zIndex=1):(o=null,c.zIndex=null)}),s.push(c)}async function d(){let e=document.getElementById(`map`);e.classList.toggle(`dark-mode`);let t=document.getElementById(`mode-toggle`);t&&(e.classList.contains(`dark-mode`)?t.textContent=`Light Mode`:t.textContent=`Dark Mode`),s.forEach(e=>{e.map=null});let{Map:n}=await google.maps.importLibrary(`maps`);a=new n(e,{center:a.getCenter(),zoom:a.getZoom(),minZoom:5,disableDefaultUI:!0,mapId:e.classList.contains(`dark-mode`)?i:r,clickableIcons:!1});let c=[...s];s=[];for(let e of c){e.map=a;let t=e.content;document.getElementById(`map`).classList.contains(`dark-mode`)?t.setMode(`dark`):t.setMode(`light`),s.push(e)}a.addListener(`click`,async e=>{let t=e.domEvent.target,n=!1;for(;t;){if(t.tagName===`SIMPLE-WEATHER-WIDGET`||t.classList.contains(`gm-control-active`)){n=!0;break}t=t.parentElement}if(!n&&e.latLng){if(o){let e=o.shadowRoot.getElementById(`rain-details`);e.style.display=`none`,o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`);let t=s.find(e=>e.content===o);t&&(t.zIndex=null),o=null}let t=s.findIndex(e=>e.markerType===`dynamic`);t!==-1&&(s[t].map=null,s.splice(t,1)),await u({name:`Clicked Location`,lat:e.latLng.lat(),lng:e.latLng.lng()},`dynamic`)}})}var f=[{name:`London`,lat:51.5074,lng:-.1278},{name:`Brussels`,lat:50.8503,lng:4.3517},{name:`Luxembourg`,lat:49.8153,lng:6.1296},{name:`Amsterdam`,lat:52.3676,lng:4.9041},{name:`Berlin`,lat:52.52,lng:13.405},{name:`Rome`,lat:41.9028,lng:12.4964},{name:`Geneva`,lat:46.2044,lng:6.14324},{name:`Barcelona`,lat:41.3874,lng:-2.1686},{name:`Milan`,lat:45.4685,lng:9.1824}];async function p(){let{AdvancedMarkerElement:e}=await google.maps.importLibrary(`marker`);for(let e of f)await u(e,`button`)}function m(){if(o){let e=s.find(e=>e.content===o&&e.markerType===`button`);if(e){let t=o.shadowRoot.getElementById(`rain-details`);t.style.display=`none`,o.shadowRoot.querySelector(`.widget-container`).classList.remove(`highlight`),e.zIndex=null,o=null}}s.filter(e=>e.markerType===`button`).forEach(e=>{e.map=null;let t=s.indexOf(e);t>-1&&s.splice(t,1)})}async function h(e,r,i){let a=`${t}?key=${n}&location.latitude=${i.lat()}&location.longitude=${i.lng()}`;try{let e=await fetch(a);if(e.ok){let t=await e.json();console.log(`Weather data fetched for marker:`,t),r.data=t}else{let t=await e.json();if(console.error(`API error response:`,t),e.status===404&&t?.error?.status===`NOT_FOUND`)r.data={error:`Location not supported`};else throw Error(`HTTP error! status: ${e.status}`)}}catch(e){console.error(`Error fetching weather data for marker:`,e),r.data={error:`Failed to fetch weather data`}}}l(),customElements.whenDefined(`simple-weather-widget`).then(()=>{let e=document.getElementById(`mode-toggle`);e&&e.addEventListener(`click`,()=>{d()});let t=document.getElementById(`load-markers-button`);t&&t.addEventListener(`click`,()=>{c?(m(),c=!1,t.textContent=`Load Markers`):(p(),c=!0,t.textContent=`Remove Markers`)})}); \ No newline at end of file diff --git a/dist/samples/weather-api-current-compact/dist/index.html b/dist/samples/weather-api-current-compact/dist/index.html index b65899c76..b97602bd6 100644 --- a/dist/samples/weather-api-current-compact/dist/index.html +++ b/dist/samples/weather-api-current-compact/dist/index.html @@ -10,7 +10,7 @@ Simple Map - + diff --git a/dist/samples/weather-api-current-compact/docs/index.js b/dist/samples/weather-api-current-compact/docs/index.js index 7be672390..50133ea82 100644 --- a/dist/samples/weather-api-current-compact/docs/index.js +++ b/dist/samples/weather-api-current-compact/docs/index.js @@ -113,8 +113,10 @@ async function initMap() { * @param markerType The type of marker ('initial', 'button', 'dynamic'). */ async function createAndAddMarker(location, markerType) { - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [{ AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); const weatherWidget = document.createElement('simple-weather-widget'); // Apply dark mode if the map container is in dark mode diff --git a/dist/samples/weather-api-current-compact/docs/index.ts b/dist/samples/weather-api-current-compact/docs/index.ts index cfa99e1d6..94e5444e7 100644 --- a/dist/samples/weather-api-current-compact/docs/index.ts +++ b/dist/samples/weather-api-current-compact/docs/index.ts @@ -116,8 +116,10 @@ async function createAndAddMarker( location: { name: string; lat: number; lng: number }, markerType: 'initial' | 'button' | 'dynamic' ): Promise { - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [{ AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); const weatherWidget = document.createElement( 'simple-weather-widget' ) as SimpleWeatherWidget; diff --git a/dist/samples/weather-api-current-compact/jsfiddle/demo.js b/dist/samples/weather-api-current-compact/jsfiddle/demo.js index 24bc72bb3..15d2ad09a 100644 --- a/dist/samples/weather-api-current-compact/jsfiddle/demo.js +++ b/dist/samples/weather-api-current-compact/jsfiddle/demo.js @@ -112,8 +112,10 @@ async function initMap() { * @param markerType The type of marker ('initial', 'button', 'dynamic'). */ async function createAndAddMarker(location, markerType) { - const { AdvancedMarkerElement } = await google.maps.importLibrary('marker'); - const { LatLng } = await google.maps.importLibrary('core'); + const [{ AdvancedMarkerElement }, { LatLng }] = await Promise.all([ + google.maps.importLibrary('marker'), + google.maps.importLibrary('core'), + ]); const weatherWidget = document.createElement('simple-weather-widget'); // Apply dark mode if the map container is in dark mode