Skip to content

Commit 2bf6bf0

Browse files
authored
Merge branch 'main' into pkit-nearby
2 parents 4ec1af9 + 0cc3b82 commit 2bf6bf0

File tree

1,601 files changed

+38477
-36224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,601 files changed

+38477
-36224
lines changed

dist/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,15 @@ <h1>Maps JSAPI Samples</h1>
5656
<li><a href='/samples/deckgl-kml/dist'>deckgl-kml</a></li>
5757
<li><a href='/samples/deckgl-kml-updated/dist'>deckgl-kml-updated</a></li>
5858
<li><a href='/samples/deckgl-polygon/dist'>deckgl-polygon</a></li>
59-
<li><a href='/samples/js-api-loader-map/dist'>js-api-loader-map</a></li>
6059
<li><a href='/samples/layer-data-quakes-red/dist'>layer-data-quakes-red</a></li>
6160
<li><a href='/samples/layer-data-quakes-simple/dist'>layer-data-quakes-simple</a></li>
6261
<li><a href='/samples/layer-data-simple/dist'>layer-data-simple</a></li>
6362
<li><a href='/samples/layer-data-style/dist'>layer-data-style</a></li>
64-
<li><a href='/samples/map-drawing-terradraw/dist'>map-drawing-terradraw</a></li>
6563
<li><a href='/samples/map-projection-simple/dist'>map-projection-simple</a></li>
6664
<li><a href='/samples/map-simple/dist'>map-simple</a></li>
6765
<li><a href='/samples/place-autocomplete-basic-map/dist'>place-autocomplete-basic-map</a></li>
6866
<li><a href='/samples/place-autocomplete-data-session/dist'>place-autocomplete-data-session</a></li>
67+
<li><a href='/samples/place-autocomplete-data-simple/dist'>place-autocomplete-data-simple</a></li>
6968
<li><a href='/samples/place-autocomplete-element/dist'>place-autocomplete-element</a></li>
7069
<li><a href='/samples/place-autocomplete-map/dist'>place-autocomplete-map</a></li>
7170
<li><a href='/samples/place-class/dist'>place-class</a></li>
@@ -93,6 +92,7 @@ <h1>Maps JSAPI Samples</h1>
9392
<li><a href='/samples/ui-kit-place-search-text-compact/dist'>ui-kit-place-search-text-compact</a></li>
9493
<li><a href='/samples/weather-api-current-compact/dist'>weather-api-current-compact</a></li>
9594
<li><a href='/samples/web-components-map/dist'>web-components-map</a></li>
95+
<li><a href='/samples/web-components-markers/dist'>web-components-markers</a></li>
9696
</ul>
9797
</body>
9898
</html>

dist/samples/3d-accessibility-features/app/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Google Maps JavaScript Sample
22

3-
This sample is generated from @googlemaps/js-samples located at
4-
https://github.com/googlemaps-samples/js-api-samples.
3+
## 3d-accessibility-features
4+
5+
The 3d-accessibility-features sample demonstrates how to use accessibility features in a 3D map, such as keyboard and screen reader support.
6+
7+
Follow these instructions to set up and run 3d-accessibility-features sample on your local computer.
58

69
## Setup
710

@@ -19,7 +22,7 @@ First `cd` to the folder for the sample to run, then:
1922

2023
From `samples/`:
2124

22-
`$npm run build --workspace=sample-name/`
25+
`$npm run build --workspace=3d-accessibility-features/`
2326

2427
### Build all of the examples.
2528

@@ -30,4 +33,3 @@ From `samples/`:
3033

3134
For feedback related to this sample, please open a new issue on
3235
[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues).
33-

dist/samples/3d-accessibility-features/app/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
-->
77
<!-- [START maps_3d_accessibility_features] -->
88
<html>
9-
<head>
10-
<title>Map</title>
9+
<head>
10+
<title>Map</title>
1111

12-
<link rel="stylesheet" type="text/css" href="./style.css" />
13-
<script type="module" src="./index.js"></script>
14-
</head>
15-
<body>
16-
<div id="map"></div>
12+
<link rel="stylesheet" type="text/css" href="./style.css" />
13+
<script type="module" src="./index.js"></script>
14+
</head>
15+
<body>
16+
<div id="map"></div>
1717

18-
<!-- prettier-ignore -->
19-
<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))})
20-
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta",});</script>
21-
</body>
18+
<!-- prettier-ignore -->
19+
<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))})
20+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly",});</script>
21+
</body>
2222
</html>
2323
<!-- [END maps_3d_accessibility_features] -->

dist/samples/3d-accessibility-features/app/index.ts

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,82 @@
11
/*
2-
* @license
3-
* Copyright 2025 Google LLC. All Rights Reserved.
4-
* SPDX-License-Identifier: Apache-2.0
5-
*/
2+
* @license
3+
* Copyright 2025 Google LLC. All Rights Reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
66

77
// @ts-nocheck
88
// [START maps_3d_accessibility_features]
99
async function initMap() {
10-
const { Map3DElement, Marker3DInteractiveElement, PopoverElement } = await google.maps.importLibrary("maps3d");
11-
const { PinElement } = await google.maps.importLibrary("marker");
10+
const { Map3DElement, Marker3DInteractiveElement, PopoverElement } =
11+
await google.maps.importLibrary('maps3d');
12+
const { PinElement } = await google.maps.importLibrary('marker');
1213

13-
const map = new Map3DElement({
14-
center: { lat: 34.8405, lng : -111.7909, altitude: 1322.70 }, range: 13279.50, tilt: 67.44 ,heading: 0.01,
15-
mode: 'SATELLITE',
16-
gestureHandling: "COOPERATIVE"
17-
});
14+
const map = new Map3DElement({
15+
center: { lat: 34.8405, lng: -111.7909, altitude: 1322.7 },
16+
range: 13279.5,
17+
tilt: 67.44,
18+
heading: 0.01,
19+
mode: 'SATELLITE',
20+
gestureHandling: 'COOPERATIVE',
21+
});
1822

19-
// Set LatLng and title text for the markers. The first marker (Boynton Pass)
20-
// receives the initial focus when tab is pressed. Use arrow keys to move
21-
// between markers; press tab again to cycle through the map controls.
22-
const tourStops = [
23-
{
24-
position: { lat: 34.8791806, lng: -111.8265049 },
25-
title: "Boynton Pass",
26-
},
27-
{
28-
position: { lat: 34.8559195, lng: -111.7988186 },
29-
title: "Airport Mesa",
30-
},
31-
{
32-
position: { lat: 34.832149, lng: -111.7695277 },
33-
title: "Chapel of the Holy Cross",
34-
},
35-
{
36-
position: { lat: 34.823736, lng: -111.8001857 },
37-
title: "Red Rock Crossing",
38-
},
39-
{
40-
position: { lat: 34.800326, lng: -111.7665047 },
41-
title: "Bell Rock",
42-
},
43-
];
23+
// Set LatLng and title text for the markers. The first marker (Boynton Pass)
24+
// receives the initial focus when tab is pressed. Use arrow keys to move
25+
// between markers; press tab again to cycle through the map controls.
26+
const tourStops = [
27+
{
28+
position: { lat: 34.8791806, lng: -111.8265049 },
29+
title: 'Boynton Pass',
30+
},
31+
{
32+
position: { lat: 34.8559195, lng: -111.7988186 },
33+
title: 'Airport Mesa',
34+
},
35+
{
36+
position: { lat: 34.832149, lng: -111.7695277 },
37+
title: 'Chapel of the Holy Cross',
38+
},
39+
{
40+
position: { lat: 34.823736, lng: -111.8001857 },
41+
title: 'Red Rock Crossing',
42+
},
43+
{
44+
position: { lat: 34.800326, lng: -111.7665047 },
45+
title: 'Bell Rock',
46+
},
47+
];
4448

45-
tourStops.forEach(({ position, title }, i) => {
46-
const pin = new PinElement({
47-
glyphText: `${i + 1}`,
48-
scale: 1.5,
49-
glyphColor: "#FFFFFF"
50-
});
51-
const popover = new PopoverElement();
49+
tourStops.forEach(({ position, title }, i) => {
50+
const pin = new PinElement({
51+
glyphText: `${i + 1}`,
52+
scale: 1.5,
53+
glyphColor: '#FFFFFF',
54+
});
55+
const popover = new PopoverElement();
5256

53-
const content = `${i + 1}. ${title}`;
54-
const header = document.createElement('span');
55-
// Include the label for screen readers.
56-
header.ariaLabel = `This is marker ${i + 1}. ${title}`;
57-
header.slot = 'header';
57+
const content = `${i + 1}. ${title}`;
58+
const header = document.createElement('span');
59+
// Include the label for screen readers.
60+
header.ariaLabel = `This is marker ${i + 1}. ${title}`;
61+
header.slot = 'header';
5862

59-
popover.append(header);
60-
popover.append(content);
63+
popover.append(header);
64+
popover.append(content);
6165

62-
const interactiveMarker = new Marker3DInteractiveElement({
63-
// Include a title, used for accessibility text for use by screen readers.
64-
title,
65-
position,
66-
gmpPopoverTargetElement: popover
67-
});
66+
const interactiveMarker = new Marker3DInteractiveElement({
67+
// Include a title, used for accessibility text for use by screen readers.
68+
title,
69+
position,
70+
gmpPopoverTargetElement: popover,
71+
});
6872

69-
interactiveMarker.append(pin);
73+
interactiveMarker.append(pin);
7074

71-
map.append(interactiveMarker);
72-
map.append(popover);
73-
});
75+
map.append(interactiveMarker);
76+
map.append(popover);
77+
});
7478

75-
document.body.append(map);
79+
document.body.append(map);
7680
}
7781

7882
initMap();

dist/samples/3d-accessibility-features/app/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
*/
1010
html,
1111
map {
12-
height: 100%;
12+
height: 100%;
1313
}
1414
body {
15-
height: 100%;
16-
margin: 0;
17-
padding: 0;
15+
height: 100%;
16+
margin: 0;
17+
padding: 0;
1818
}
1919
/* [END maps_3d_accessibility_features] */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
html,map{height:100%}body{height:100%;margin:0;padding:0}

dist/samples/3d-accessibility-features/dist/assets/index-C8EVyAYe.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/samples/3d-accessibility-features/dist/assets/index-CoX0ZzLD.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

dist/samples/3d-accessibility-features/dist/assets/index-DDwKyjRS.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

dist/samples/3d-accessibility-features/dist/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
-->
77
<!-- [START maps_3d_accessibility_features] -->
88
<html>
9-
<head>
10-
<title>Map</title>
9+
<head>
10+
<title>Map</title>
1111

12-
<script type="module" crossorigin src="./assets/index-CoX0ZzLD.js"></script>
13-
<link rel="stylesheet" crossorigin href="./assets/index-DDwKyjRS.css">
14-
</head>
15-
<body>
16-
<div id="map"></div>
12+
<script type="module" crossorigin src="./assets/index-C8EVyAYe.js"></script>
13+
<link rel="stylesheet" crossorigin href="./assets/index-BVXE32j3.css">
14+
</head>
15+
<body>
16+
<div id="map"></div>
1717

18-
<!-- prettier-ignore -->
19-
<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))})
20-
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "beta",});</script>
21-
</body>
18+
<!-- prettier-ignore -->
19+
<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))})
20+
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly",});</script>
21+
</body>
2222
</html>
2323
<!-- [END maps_3d_accessibility_features] -->

0 commit comments

Comments
 (0)