Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dist/samples/advanced-markers-accessibility/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<script>(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta"});</script>
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
</head>
<body>
<gmp-map zoom="12" center="34.84555,-111.8035" map-id="4504f8b37365c3d0"></gmp-map>
</body>
</html>
<!-- [END maps_advanced_markers_accessibility] -->
16 changes: 6 additions & 10 deletions dist/samples/advanced-markers-accessibility/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
*/

// [START maps_advanced_markers_accessibility]
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;

async function initMap() {
// Request needed libraries.
const { Map, InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary;

const map = new Map(document.getElementById("map") as HTMLElement, {
zoom: 12,
center: { lat: 34.84555, lng: -111.8035 },
mapId: '4504f8b37365c3d0',
});

// 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
// between markers; press tab again to cycle through the map controls.
Expand Down Expand Up @@ -47,19 +43,19 @@ async function initMap() {

// Create the markers.
tourStops.forEach(({position, title}, i) => {
// [START maps_advanced_markers_accessibility_marker]
const pin = new PinElement({
//@ts-ignore
glyphText: `${i + 1}`,
scale: 1.5,
});
// [START maps_advanced_markers_accessibility_marker]
const marker = new AdvancedMarkerElement({
position,
map,
title: `${i + 1}. ${title}`,
content: pin.element,
gmpClickable: true,
});
marker.append(pin);
mapElement.append(marker);
// [END maps_advanced_markers_accessibility_marker]
// [START maps_advanced_markers_accessibility_event_listener]
// Add a click listener for each marker, and set up the info window.
Expand All @@ -74,4 +70,4 @@ async function initMap() {
}

initMap();
// [END maps_advanced_markers_accessibility]
// [END maps_advanced_markers_accessibility]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

12 changes: 6 additions & 6 deletions dist/samples/advanced-markers-accessibility/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<head>
<title>Advanced Marker Accessibility</title>

<script type="module" crossorigin src="./assets/index-DuBZ4WNk.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DW_Ml_OD.css">
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<script>(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta"});</script>
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
<script type="module" crossorigin src="./assets/index-8ZTzap-z.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DW_Ml_OD.css">
</head>
<body>
<gmp-map zoom="12" center="34.84555,-111.8035" map-id="4504f8b37365c3d0"></gmp-map>
</body>
</html>
<!-- [END maps_advanced_markers_accessibility] -->
8 changes: 4 additions & 4 deletions dist/samples/advanced-markers-accessibility/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<script>(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta"});</script>
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
</head>
<body>
<gmp-map zoom="12" center="34.84555,-111.8035" map-id="4504f8b37365c3d0"></gmp-map>
</body>
</html>
<!-- [END maps_advanced_markers_accessibility] -->
12 changes: 4 additions & 8 deletions dist/samples/advanced-markers-accessibility/docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
// [START maps_advanced_markers_accessibility]
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 = new Map(document.getElementById("map"), {
zoom: 12,
center: { lat: 34.84555, lng: -111.8035 },
mapId: '4504f8b37365c3d0',
});
// 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
// between markers; press tab again to cycle through the map controls.
Expand Down Expand Up @@ -43,19 +39,19 @@ async function initMap() {
const infoWindow = new InfoWindow();
// Create the markers.
tourStops.forEach(({ position, title }, i) => {
// [START maps_advanced_markers_accessibility_marker]
const pin = new PinElement({
//@ts-ignore
glyphText: `${i + 1}`,
scale: 1.5,
});
// [START maps_advanced_markers_accessibility_marker]
const marker = new AdvancedMarkerElement({
position,
map,
title: `${i + 1}. ${title}`,
content: pin.element,
gmpClickable: true,
});
marker.append(pin);
mapElement.append(marker);
// [END maps_advanced_markers_accessibility_marker]
// [START maps_advanced_markers_accessibility_event_listener]
// Add a click listener for each marker, and set up the info window.
Expand Down
16 changes: 6 additions & 10 deletions dist/samples/advanced-markers-accessibility/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
*/

// [START maps_advanced_markers_accessibility]
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;

async function initMap() {
// Request needed libraries.
const { Map, InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
const { AdvancedMarkerElement, PinElement } = await google.maps.importLibrary("marker") as google.maps.MarkerLibrary;

const map = new Map(document.getElementById("map") as HTMLElement, {
zoom: 12,
center: { lat: 34.84555, lng: -111.8035 },
mapId: '4504f8b37365c3d0',
});

// 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
// between markers; press tab again to cycle through the map controls.
Expand Down Expand Up @@ -47,19 +43,19 @@ async function initMap() {

// Create the markers.
tourStops.forEach(({position, title}, i) => {
// [START maps_advanced_markers_accessibility_marker]
const pin = new PinElement({
//@ts-ignore
glyphText: `${i + 1}`,
scale: 1.5,
});
// [START maps_advanced_markers_accessibility_marker]
const marker = new AdvancedMarkerElement({
position,
map,
title: `${i + 1}. ${title}`,
content: pin.element,
gmpClickable: true,
});
marker.append(pin);
mapElement.append(marker);
// [END maps_advanced_markers_accessibility_marker]
// [START maps_advanced_markers_accessibility_event_listener]
// Add a click listener for each marker, and set up the info window.
Expand All @@ -74,4 +70,4 @@ async function initMap() {
}

initMap();
// [END maps_advanced_markers_accessibility]
// [END maps_advanced_markers_accessibility]
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="module" src="./index.js"></script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->
<script>(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta"});</script>
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
</head>
<body>
<gmp-map zoom="12" center="34.84555,-111.8035" map-id="4504f8b37365c3d0"></gmp-map>
</body>
</html>

12 changes: 4 additions & 8 deletions dist/samples/advanced-markers-accessibility/jsfiddle/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

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 = new Map(document.getElementById("map"), {
zoom: 12,
center: { lat: 34.84555, lng: -111.8035 },
mapId: '4504f8b37365c3d0',
});
// 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
// between markers; press tab again to cycle through the map controls.
Expand Down Expand Up @@ -43,19 +39,19 @@ async function initMap() {
const infoWindow = new InfoWindow();
// Create the markers.
tourStops.forEach(({ position, title }, i) => {

const pin = new PinElement({
//@ts-ignore
glyphText: `${i + 1}`,
scale: 1.5,
});

const marker = new AdvancedMarkerElement({
position,
map,
title: `${i + 1}. ${title}`,
content: pin.element,
gmpClickable: true,
});
marker.append(pin);
mapElement.append(marker);


// Add a click listener for each marker, and set up the info window.
Expand Down