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
10 changes: 8 additions & 2 deletions dist/samples/3d-accessibility-features/app/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<!--
@license
Copyright 2025 Google LLC. All Rights Reserved.
Copyright 2026 Google LLC. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
-->
<!-- [START maps_3d_accessibility_features] -->
Expand All @@ -19,7 +19,13 @@
</script>
</head>
<body>
<div id="map"></div>
<gmp-map-3d
center="34.8405,-111.7909,1322.7"
range="13279.5"
tilt="67.44"
heading="0.01"
mode="satellite"
gesture-handling="cooperative"></gmp-map-3d>
</body>
</html>
<!-- [END maps_3d_accessibility_features] -->
37 changes: 15 additions & 22 deletions dist/samples/3d-accessibility-features/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
/*
* @license
* Copyright 2025 Google LLC. All Rights Reserved.
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

// [START maps_3d_accessibility_features]
async function init() {
const [
{ Map3DElement, Marker3DInteractiveElement, PopoverElement },
{ PinElement },
] = await Promise.all([
google.maps.importLibrary('maps3d'),
google.maps.importLibrary('marker'),
]);
async function init(): Promise<void> {
// Import the needed libraries.
const [{ 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 },
range: 13279.5,
tilt: 67.44,
heading: 0.01,
mode: 'SATELLITE',
});
const map3DElement = document.querySelector('gmp-map-3d')!;

// 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
Expand Down Expand Up @@ -50,16 +43,16 @@ async function init() {

tourStops.forEach(({ position, title }, i) => {
const pin = new PinElement({
glyphText: `${i + 1}`,
glyphText: String(i + 1),
scale: 1.5,
glyphColor: '#FFFFFF',
});
const popover = new PopoverElement();

const content = `${i + 1}. ${title}`;
const content = `${String(i + 1)}. ${title}`;
const header = document.createElement('span');
// Include the label for screen readers.
header.ariaLabel = `This is marker ${i + 1}. ${title}`;
header.ariaLabel = `This is marker ${String(i + 1)}. ${title}`;
header.slot = 'header';

popover.append(header);
Expand All @@ -74,11 +67,11 @@ async function init() {

interactiveMarker.append(pin);

map.append(interactiveMarker);
map.append(popover);
map3DElement.append(interactiveMarker);
map3DElement.append(popover);
});

document.body.append(map);
document.body.append(map3DElement);
}

void init();
Expand Down
2 changes: 1 addition & 1 deletion dist/samples/3d-accessibility-features/app/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* @license
* Copyright 2025 Google LLC. All Rights Reserved.
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* [START maps_3d_accessibility_features] */
Expand Down

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

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

14 changes: 10 additions & 4 deletions dist/samples/3d-accessibility-features/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<!--
@license
Copyright 2025 Google LLC. All Rights Reserved.
Copyright 2026 Google LLC. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
-->
<!-- [START maps_3d_accessibility_features] -->
Expand All @@ -12,14 +12,20 @@
<script>
// prettier-ignore
(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"
key: "AIzaSyCvnRQfZBSFPtTg0ybJiiUm80Gs7iG6uRQ"
});
</script>
<script type="module" crossorigin src="./assets/index-Brcdi0NO.js"></script>
<script type="module" crossorigin src="./assets/index-Db1RMFBd.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BVXE32j3.css">
</head>
<body>
<div id="map"></div>
<gmp-map-3d
center="34.8405,-111.7909,1322.7"
range="13279.5"
tilt="67.44"
heading="0.01"
mode="satellite"
gesture-handling="cooperative"></gmp-map-3d>
</body>
</html>
<!-- [END maps_3d_accessibility_features] -->
10 changes: 8 additions & 2 deletions dist/samples/3d-accessibility-features/docs/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<!--
@license
Copyright 2025 Google LLC. All Rights Reserved.
Copyright 2026 Google LLC. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
-->
<!-- [START maps_3d_accessibility_features] -->
Expand All @@ -19,7 +19,13 @@
</script>
</head>
<body>
<div id="map"></div>
<gmp-map-3d
center="34.8405,-111.7909,1322.7"
range="13279.5"
tilt="67.44"
heading="0.01"
mode="satellite"
gesture-handling="cooperative"></gmp-map-3d>
</body>
</html>
<!-- [END maps_3d_accessibility_features] -->
35 changes: 14 additions & 21 deletions dist/samples/3d-accessibility-features/docs/index.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
'use strict';
/*
* @license
* Copyright 2025 Google LLC. All Rights Reserved.
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

// [START maps_3d_accessibility_features]
async function init() {
const [
{ Map3DElement, Marker3DInteractiveElement, PopoverElement },
{ PinElement },
] = await Promise.all([
google.maps.importLibrary('maps3d'),
google.maps.importLibrary('marker'),
]);
// Import the needed libraries.
const [{ 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 },
range: 13279.5,
tilt: 67.44,
heading: 0.01,
mode: 'SATELLITE',
});
const map3DElement = document.querySelector('gmp-map-3d');

// 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
Expand Down Expand Up @@ -51,16 +44,16 @@ async function init() {

tourStops.forEach(({ position, title }, i) => {
const pin = new PinElement({
glyphText: `${i + 1}`,
glyphText: String(i + 1),
scale: 1.5,
glyphColor: '#FFFFFF',
});
const popover = new PopoverElement();

const content = `${i + 1}. ${title}`;
const content = `${String(i + 1)}. ${title}`;
const header = document.createElement('span');
// Include the label for screen readers.
header.ariaLabel = `This is marker ${i + 1}. ${title}`;
header.ariaLabel = `This is marker ${String(i + 1)}. ${title}`;
header.slot = 'header';

popover.append(header);
Expand All @@ -75,11 +68,11 @@ async function init() {

interactiveMarker.append(pin);

map.append(interactiveMarker);
map.append(popover);
map3DElement.append(interactiveMarker);
map3DElement.append(popover);
});

document.body.append(map);
document.body.append(map3DElement);
}

void init();
Expand Down
37 changes: 15 additions & 22 deletions dist/samples/3d-accessibility-features/docs/index.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
/*
* @license
* Copyright 2025 Google LLC. All Rights Reserved.
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

// [START maps_3d_accessibility_features]
async function init() {
const [
{ Map3DElement, Marker3DInteractiveElement, PopoverElement },
{ PinElement },
] = await Promise.all([
google.maps.importLibrary('maps3d'),
google.maps.importLibrary('marker'),
]);
async function init(): Promise<void> {
// Import the needed libraries.
const [{ 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 },
range: 13279.5,
tilt: 67.44,
heading: 0.01,
mode: 'SATELLITE',
});
const map3DElement = document.querySelector('gmp-map-3d')!;

// 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
Expand Down Expand Up @@ -50,16 +43,16 @@ async function init() {

tourStops.forEach(({ position, title }, i) => {
const pin = new PinElement({
glyphText: `${i + 1}`,
glyphText: String(i + 1),
scale: 1.5,
glyphColor: '#FFFFFF',
});
const popover = new PopoverElement();

const content = `${i + 1}. ${title}`;
const content = `${String(i + 1)}. ${title}`;
const header = document.createElement('span');
// Include the label for screen readers.
header.ariaLabel = `This is marker ${i + 1}. ${title}`;
header.ariaLabel = `This is marker ${String(i + 1)}. ${title}`;
header.slot = 'header';

popover.append(header);
Expand All @@ -74,11 +67,11 @@ async function init() {

interactiveMarker.append(pin);

map.append(interactiveMarker);
map.append(popover);
map3DElement.append(interactiveMarker);
map3DElement.append(popover);
});

document.body.append(map);
document.body.append(map3DElement);
}

void init();
Expand Down
2 changes: 1 addition & 1 deletion dist/samples/3d-accessibility-features/docs/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* @license
* Copyright 2025 Google LLC. All Rights Reserved.
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* [START maps_3d_accessibility_features] */
Expand Down
2 changes: 1 addition & 1 deletion dist/samples/3d-accessibility-features/jsfiddle/demo.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* @license
* Copyright 2025 Google LLC. All Rights Reserved.
* Copyright 2026 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down
10 changes: 8 additions & 2 deletions dist/samples/3d-accessibility-features/jsfiddle/demo.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<!--
@license
Copyright 2025 Google LLC. All Rights Reserved.
Copyright 2026 Google LLC. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
-->

Expand All @@ -19,6 +19,12 @@
</script>
</head>
<body>
<div id="map"></div>
<gmp-map-3d
center="34.8405,-111.7909,1322.7"
range="13279.5"
tilt="67.44"
heading="0.01"
mode="satellite"
gesture-handling="cooperative"></gmp-map-3d>
</body>
</html>
Loading
Loading