From 6e21fdc71fb4744895581dd45556221287474531 Mon Sep 17 00:00:00 2001 From: googlemaps-bot Date: Mon, 20 Apr 2026 21:34:36 +0000 Subject: [PATCH] Update dist folder [skip ci] --- dist/samples/infowindow-simple/app/index.ts | 43 ++++++++++++++----- .../dist/assets/index-0RrE2FoA.js | 1 - .../dist/assets/index-KKDybtyC.js | 8 ++++ .../samples/infowindow-simple/dist/index.html | 2 +- dist/samples/infowindow-simple/docs/index.js | 40 ++++++++++++----- dist/samples/infowindow-simple/docs/index.ts | 43 ++++++++++++++----- .../infowindow-simple/jsfiddle/demo.js | 40 ++++++++++++----- 7 files changed, 135 insertions(+), 42 deletions(-) delete mode 100644 dist/samples/infowindow-simple/dist/assets/index-0RrE2FoA.js create mode 100644 dist/samples/infowindow-simple/dist/assets/index-KKDybtyC.js diff --git a/dist/samples/infowindow-simple/app/index.ts b/dist/samples/infowindow-simple/app/index.ts index d3571595..86355c26 100644 --- a/dist/samples/infowindow-simple/app/index.ts +++ b/dist/samples/infowindow-simple/app/index.ts @@ -9,28 +9,43 @@ // When the user clicks the marker, an info window opens. async function initMap(): Promise { + // Import the needed libraries. await google.maps.importLibrary("maps"); await google.maps.importLibrary("marker"); - const uluru = { lat: -25.363, lng: 131.044 }; + // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map') as google.maps.MapElement; const innerMap = mapElement.innerMap; + // Get the center of the map. + const center = mapElement.center; + + // Create the info window content. const heading = document.createElement("h1"); heading.textContent = "Uluru (Ayers Rock)"; const content = document.createElement("div"); - const p1 = document.createElement("p"); - p1.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 Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and Yankunytjatjara, the Aboriginal people of the area. It has many springs, waterholes, rock caves and ancient paintings. Uluru is listed as a World Heritage Site."; - content.appendChild(p1); + const infoParagraph = document.createElement("p"); + infoParagraph.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 + Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and + Yankunytjatjara, the Aboriginal people of the area. It has many springs, + waterholes, rock caves and ancient paintings. Uluru is listed as a World + Heritage Site.`; + + content.appendChild(infoParagraph); - const a = document.createElement("a"); - a.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.target = "_blank"; - content.appendChild(a); + const link = document.createElement("a"); + link.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.target = "_blank"; + content.appendChild(link); + // Create the info window. const infowindow = new google.maps.InfoWindow({ headerContent: heading, content: content, @@ -38,13 +53,21 @@ async function initMap(): Promise { maxWidth: 500, // Set max width (optional). }); + // Create the marker. const marker = new google.maps.marker.AdvancedMarkerElement({ - position: uluru, + position: center, map: innerMap, title: "Uluru (Ayers Rock)", gmpClickable: true, }); + // Open the info window when the map loads. + infowindow.open({ + anchor: marker, + map: innerMap, + }); + + // Open the info window when the marker is clicked. marker.addEventListener("gmp-click", () => { infowindow.open({ anchor: marker, diff --git a/dist/samples/infowindow-simple/dist/assets/index-0RrE2FoA.js b/dist/samples/infowindow-simple/dist/assets/index-0RrE2FoA.js deleted file mode 100644 index 064f6922..00000000 --- a/dist/samples/infowindow-simple/dist/assets/index-0RrE2FoA.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(){await google.maps.importLibrary(`maps`),await google.maps.importLibrary(`marker`);let e={lat:-25.363,lng:131.044},t=document.querySelector(`gmp-map`).innerMap,n=document.createElement(`h1`);n.textContent=`Uluru (Ayers Rock)`;let r=document.createElement(`div`),i=document.createElement(`p`);i.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 Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and Yankunytjatjara, the Aboriginal people of the area. It has many springs, waterholes, rock caves and ancient paintings. Uluru is listed as a World Heritage Site.`,r.appendChild(i);let a=document.createElement(`a`);a.href=`https://en.wikipedia.org/w/index.php?title=Uluru`,a.textContent=`https://en.wikipedia.org/w/index.php?title=Uluru`,a.target=`_blank`,r.appendChild(a);let o=new google.maps.InfoWindow({headerContent:n,content:r,ariaLabel:`Uluru`,maxWidth:500}),s=new google.maps.marker.AdvancedMarkerElement({position:e,map:t,title:`Uluru (Ayers Rock)`,gmpClickable:!0});s.addEventListener(`gmp-click`,()=>{o.open({anchor:s,map:t})})}e(); \ No newline at end of file diff --git a/dist/samples/infowindow-simple/dist/assets/index-KKDybtyC.js b/dist/samples/infowindow-simple/dist/assets/index-KKDybtyC.js new file mode 100644 index 00000000..095fc10b --- /dev/null +++ b/dist/samples/infowindow-simple/dist/assets/index-KKDybtyC.js @@ -0,0 +1,8 @@ +(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`),await google.maps.importLibrary(`marker`);let e=document.querySelector(`gmp-map`),t=e.innerMap,n=e.center,r=document.createElement(`h1`);r.textContent=`Uluru (Ayers Rock)`;let i=document.createElement(`div`),a=document.createElement(`p`);a.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 + Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and + Yankunytjatjara, the Aboriginal people of the area. It has many springs, + waterholes, rock caves and ancient paintings. Uluru is listed as a World + Heritage Site.`,i.appendChild(a);let o=document.createElement(`a`);o.href=`https://en.wikipedia.org/w/index.php?title=Uluru`,o.textContent=`https://en.wikipedia.org/w/index.php?title=Uluru`,o.target=`_blank`,i.appendChild(o);let s=new google.maps.InfoWindow({headerContent:r,content:i,ariaLabel:`Uluru`,maxWidth:500}),c=new google.maps.marker.AdvancedMarkerElement({position:n,map:t,title:`Uluru (Ayers Rock)`,gmpClickable:!0});s.open({anchor:c,map:t}),c.addEventListener(`gmp-click`,()=>{s.open({anchor:c,map:t})})}e(); \ No newline at end of file diff --git a/dist/samples/infowindow-simple/dist/index.html b/dist/samples/infowindow-simple/dist/index.html index fee5b622..fbb6311e 100644 --- a/dist/samples/infowindow-simple/dist/index.html +++ b/dist/samples/infowindow-simple/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/samples/infowindow-simple/docs/index.js b/dist/samples/infowindow-simple/docs/index.js index 2ab64e30..025151c8 100644 --- a/dist/samples/infowindow-simple/docs/index.js +++ b/dist/samples/infowindow-simple/docs/index.js @@ -8,34 +8,54 @@ // This example displays a marker at the center of Australia. // When the user clicks the marker, an info window opens. async function initMap() { + // Import the needed libraries. await google.maps.importLibrary("maps"); await google.maps.importLibrary("marker"); - const uluru = { lat: -25.363, lng: 131.044 }; + // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map'); const innerMap = mapElement.innerMap; + // Get the center of the map. + const center = mapElement.center; + // Create the info window content. const heading = document.createElement("h1"); heading.textContent = "Uluru (Ayers Rock)"; const content = document.createElement("div"); - const p1 = document.createElement("p"); - p1.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 Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and Yankunytjatjara, the Aboriginal people of the area. It has many springs, waterholes, rock caves and ancient paintings. Uluru is listed as a World Heritage Site."; - content.appendChild(p1); - const a = document.createElement("a"); - a.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.target = "_blank"; - content.appendChild(a); + const infoParagraph = document.createElement("p"); + infoParagraph.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 + Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and + Yankunytjatjara, the Aboriginal people of the area. It has many springs, + waterholes, rock caves and ancient paintings. Uluru is listed as a World + Heritage Site.`; + content.appendChild(infoParagraph); + const link = document.createElement("a"); + link.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.target = "_blank"; + content.appendChild(link); + // Create the info window. const infowindow = new google.maps.InfoWindow({ headerContent: heading, content: content, ariaLabel: "Uluru", maxWidth: 500, // Set max width (optional). }); + // Create the marker. const marker = new google.maps.marker.AdvancedMarkerElement({ - position: uluru, + position: center, map: innerMap, title: "Uluru (Ayers Rock)", gmpClickable: true, }); + // Open the info window when the map loads. + infowindow.open({ + anchor: marker, + map: innerMap, + }); + // Open the info window when the marker is clicked. marker.addEventListener("gmp-click", () => { infowindow.open({ anchor: marker, diff --git a/dist/samples/infowindow-simple/docs/index.ts b/dist/samples/infowindow-simple/docs/index.ts index d3571595..86355c26 100644 --- a/dist/samples/infowindow-simple/docs/index.ts +++ b/dist/samples/infowindow-simple/docs/index.ts @@ -9,28 +9,43 @@ // When the user clicks the marker, an info window opens. async function initMap(): Promise { + // Import the needed libraries. await google.maps.importLibrary("maps"); await google.maps.importLibrary("marker"); - const uluru = { lat: -25.363, lng: 131.044 }; + // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map') as google.maps.MapElement; const innerMap = mapElement.innerMap; + // Get the center of the map. + const center = mapElement.center; + + // Create the info window content. const heading = document.createElement("h1"); heading.textContent = "Uluru (Ayers Rock)"; const content = document.createElement("div"); - const p1 = document.createElement("p"); - p1.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 Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and Yankunytjatjara, the Aboriginal people of the area. It has many springs, waterholes, rock caves and ancient paintings. Uluru is listed as a World Heritage Site."; - content.appendChild(p1); + const infoParagraph = document.createElement("p"); + infoParagraph.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 + Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and + Yankunytjatjara, the Aboriginal people of the area. It has many springs, + waterholes, rock caves and ancient paintings. Uluru is listed as a World + Heritage Site.`; + + content.appendChild(infoParagraph); - const a = document.createElement("a"); - a.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.target = "_blank"; - content.appendChild(a); + const link = document.createElement("a"); + link.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.target = "_blank"; + content.appendChild(link); + // Create the info window. const infowindow = new google.maps.InfoWindow({ headerContent: heading, content: content, @@ -38,13 +53,21 @@ async function initMap(): Promise { maxWidth: 500, // Set max width (optional). }); + // Create the marker. const marker = new google.maps.marker.AdvancedMarkerElement({ - position: uluru, + position: center, map: innerMap, title: "Uluru (Ayers Rock)", gmpClickable: true, }); + // Open the info window when the map loads. + infowindow.open({ + anchor: marker, + map: innerMap, + }); + + // Open the info window when the marker is clicked. marker.addEventListener("gmp-click", () => { infowindow.open({ anchor: marker, diff --git a/dist/samples/infowindow-simple/jsfiddle/demo.js b/dist/samples/infowindow-simple/jsfiddle/demo.js index 5b605784..defeb1f2 100644 --- a/dist/samples/infowindow-simple/jsfiddle/demo.js +++ b/dist/samples/infowindow-simple/jsfiddle/demo.js @@ -8,34 +8,54 @@ // This example displays a marker at the center of Australia. // When the user clicks the marker, an info window opens. async function initMap() { + // Import the needed libraries. await google.maps.importLibrary("maps"); await google.maps.importLibrary("marker"); - const uluru = { lat: -25.363, lng: 131.044 }; + // Get the map element and the inner map from it. const mapElement = document.querySelector('gmp-map'); const innerMap = mapElement.innerMap; + // Get the center of the map. + const center = mapElement.center; + // Create the info window content. const heading = document.createElement("h1"); heading.textContent = "Uluru (Ayers Rock)"; const content = document.createElement("div"); - const p1 = document.createElement("p"); - p1.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 Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and Yankunytjatjara, the Aboriginal people of the area. It has many springs, waterholes, rock caves and ancient paintings. Uluru is listed as a World Heritage Site."; - content.appendChild(p1); - const a = document.createElement("a"); - a.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; - a.target = "_blank"; - content.appendChild(a); + const infoParagraph = document.createElement("p"); + infoParagraph.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 + Uluru - Kata Tjuta National Park. Uluru is sacred to the Pitjantjatjara and + Yankunytjatjara, the Aboriginal people of the area. It has many springs, + waterholes, rock caves and ancient paintings. Uluru is listed as a World + Heritage Site.`; + content.appendChild(infoParagraph); + const link = document.createElement("a"); + link.href = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.textContent = "https://en.wikipedia.org/w/index.php?title=Uluru"; + link.target = "_blank"; + content.appendChild(link); + // Create the info window. const infowindow = new google.maps.InfoWindow({ headerContent: heading, content: content, ariaLabel: "Uluru", maxWidth: 500, // Set max width (optional). }); + // Create the marker. const marker = new google.maps.marker.AdvancedMarkerElement({ - position: uluru, + position: center, map: innerMap, title: "Uluru (Ayers Rock)", gmpClickable: true, }); + // Open the info window when the map loads. + infowindow.open({ + anchor: marker, + map: innerMap, + }); + // Open the info window when the marker is clicked. marker.addEventListener("gmp-click", () => { infowindow.open({ anchor: marker,