diff --git a/dist/index.html b/dist/index.html index 1845c85f..bdf77245 100644 --- a/dist/index.html +++ b/dist/index.html @@ -8,9 +8,10 @@

Maps JSAPI Samples

diff --git a/dist/samples/advanced-markers-animation/dist/assets/index-DnHAx5KX.js b/dist/samples/advanced-markers-animation/dist/assets/index-DnHAx5KX.js new file mode 100644 index 00000000..2c12923d --- /dev/null +++ b/dist/samples/advanced-markers-animation/dist/assets/index-DnHAx5KX.js @@ -0,0 +1,5 @@ +(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function r(e){const 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 i(e){if(e.ep)return;e.ep=!0;const t=r(e);fetch(e.href,t)}})();/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */function d(o){const n=o.getBounds(),r=n.getSouthWest().lat(),i=n.getSouthWest().lng(),e=n.getNorthEast().lat(),t=n.getNorthEast().lng(),s=e-r;let a=t-i;return t{for(const n of o)n.isIntersecting&&(n.target.classList.add("drop"),c.unobserve(n.target))});async function l(){const{Map:o}=await google.maps.importLibrary("maps"),{AdvancedMarkerElement:n,PinElement:r}=await google.maps.importLibrary("marker"),i={lat:37.4242011827985,lng:-122.09242296450893},e=new o(document.getElementById("map"),{zoom:14,center:i,mapId:"4504f8b37365c3d0"});google.maps.event.addListenerOnce(e,"idle",()=>{for(let a=0;a<100;a++)m(e,n,r)});const t=document.createElement("div"),s=document.createElement("button");s.classList.add("ui-button"),s.innerText="Reset the example",s.addEventListener("click",()=>{p()}),t.appendChild(s),e.controls[google.maps.ControlPosition.TOP_CENTER].push(t)}function m(o,n,r){const e=new r().element;new n({position:d(o),map:o,content:e}),e.style.opacity="0",e.addEventListener("animationend",s=>{e.classList.remove("drop"),e.style.opacity="1"});const t=2+Math.random();e.style.setProperty("--delay-time",t+"s"),c.observe(e)}function p(){const o=document.getElementById("mapContainer");document.getElementById("map").remove();const r=document.createElement("div");r.id="map",o.appendChild(r),l()}l(); diff --git a/index.html b/index.html index e8434139..bdf77245 100644 --- a/index.html +++ b/index.html @@ -7,12 +7,12 @@

Maps JSAPI Samples