Skip to content

Commit f7c8755

Browse files
Update dist folder [skip ci] (#1377)
1 parent b1f782f commit f7c8755

14 files changed

Lines changed: 66 additions & 84 deletions

File tree

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22
<!--
33
@license
4-
Copyright 2025 Google LLC. All Rights Reserved.
4+
Copyright 2026 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
77
<!-- [START maps_map_simple] -->
@@ -11,13 +11,16 @@
1111

1212
<link rel="stylesheet" type="text/css" href="./style.css" />
1313
<script type="module" src="./index.js"></script>
14-
</head>
15-
<body>
16-
<div id="map"></div>
17-
1814
<!-- prettier-ignore -->
1915
<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))})
2016
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly" });</script>
17+
</head>
18+
19+
<body>
20+
<!-- [START maps_map_simple_gmpmap] -->
21+
<gmp-map center="-34.397,150.644" zoom="8" mapId="DEMO_MAP_ID">
22+
</gmp-map>
23+
<!-- [END maps_map_simple_gmpmap] -->
2124
</body>
2225
</html>
2326
<!-- [END maps_map_simple] -->

dist/samples/map-simple/app/index.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
/*
22
* @license
3-
* Copyright 2025 Google LLC. All Rights Reserved.
3+
* Copyright 2026 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
// [START maps_map_simple]
8-
let map: google.maps.Map;
98
async function initMap(): Promise<void> {
10-
const { Map, RenderingType } = (await google.maps.importLibrary(
11-
'maps'
12-
)) as google.maps.MapsLibrary;
13-
map = new Map(document.getElementById('map') as HTMLElement, {
14-
center: { lat: -34.397, lng: 150.644 },
15-
zoom: 8,
16-
renderingType: RenderingType.VECTOR,
17-
});
9+
// Import the needed libraries.
10+
await google.maps.importLibrary('maps');
11+
12+
// Create the map.
13+
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;
14+
// Access the underlying map object.
15+
const innerMap = mapElement.innerMap;
1816
}
1917

2018
initMap();

dist/samples/map-simple/app/style.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* [START maps_map_simple] */
7-
/*
8-
* Always set the map height explicitly to define the size of the div element
9-
* that contains the map.
10-
*/
11-
#map {
12-
height: 100%;
13-
}
14-
157
/*
168
* Optional: Makes the sample page fill the window.
179
*/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
html,body{height:100%;margin:0;padding:0}

dist/samples/map-simple/dist/assets/index-DWepjxzn.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/samples/map-simple/dist/assets/index-CZqO0WLr.js renamed to dist/samples/map-simple/dist/assets/index-WzusdyoD.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
<!doctype html>
22
<!--
33
@license
4-
Copyright 2025 Google LLC. All Rights Reserved.
4+
Copyright 2026 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
77
<!-- [START maps_map_simple] -->
88
<html>
99
<head>
1010
<title>Simple Map</title>
1111

12-
<script type="module" crossorigin src="./assets/index-CZqO0WLr.js"></script>
13-
<link rel="stylesheet" crossorigin href="./assets/index-DWepjxzn.css">
14-
</head>
15-
<body>
16-
<div id="map"></div>
17-
1812
<!-- prettier-ignore -->
1913
<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))})
2014
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly" });</script>
15+
<script type="module" crossorigin src="./assets/index-WzusdyoD.js"></script>
16+
<link rel="stylesheet" crossorigin href="./assets/index-549u98Rk.css">
17+
</head>
18+
19+
<body>
20+
<!-- [START maps_map_simple_gmpmap] -->
21+
<gmp-map center="-34.397,150.644" zoom="8" mapId="DEMO_MAP_ID">
22+
</gmp-map>
23+
<!-- [END maps_map_simple_gmpmap] -->
2124
</body>
2225
</html>
2326
<!-- [END maps_map_simple] -->
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22
<!--
33
@license
4-
Copyright 2025 Google LLC. All Rights Reserved.
4+
Copyright 2026 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
77
<!-- [START maps_map_simple] -->
@@ -11,13 +11,16 @@
1111

1212
<link rel="stylesheet" type="text/css" href="./style.css" />
1313
<script type="module" src="./index.js"></script>
14-
</head>
15-
<body>
16-
<div id="map"></div>
17-
1814
<!-- prettier-ignore -->
1915
<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))})
2016
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly" });</script>
17+
</head>
18+
19+
<body>
20+
<!-- [START maps_map_simple_gmpmap] -->
21+
<gmp-map center="-34.397,150.644" zoom="8" mapId="DEMO_MAP_ID">
22+
</gmp-map>
23+
<!-- [END maps_map_simple_gmpmap] -->
2124
</body>
2225
</html>
2326
<!-- [END maps_map_simple] -->
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
"use strict";
22
/*
33
* @license
4-
* Copyright 2025 Google LLC. All Rights Reserved.
4+
* Copyright 2026 Google LLC. All Rights Reserved.
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77
// [START maps_map_simple]
8-
let map;
98
async function initMap() {
10-
const { Map, RenderingType } = (await google.maps.importLibrary('maps'));
11-
map = new Map(document.getElementById('map'), {
12-
center: { lat: -34.397, lng: 150.644 },
13-
zoom: 8,
14-
renderingType: RenderingType.VECTOR,
15-
});
9+
// Import the needed libraries.
10+
await google.maps.importLibrary('maps');
11+
// Create the map.
12+
const mapElement = document.querySelector('gmp-map');
13+
// Access the underlying map object.
14+
const innerMap = mapElement.innerMap;
1615
}
1716
initMap();
1817
// [END maps_map_simple]

dist/samples/map-simple/docs/index.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
/*
22
* @license
3-
* Copyright 2025 Google LLC. All Rights Reserved.
3+
* Copyright 2026 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
// [START maps_map_simple]
8-
let map: google.maps.Map;
98
async function initMap(): Promise<void> {
10-
const { Map, RenderingType } = (await google.maps.importLibrary(
11-
'maps'
12-
)) as google.maps.MapsLibrary;
13-
map = new Map(document.getElementById('map') as HTMLElement, {
14-
center: { lat: -34.397, lng: 150.644 },
15-
zoom: 8,
16-
renderingType: RenderingType.VECTOR,
17-
});
9+
// Import the needed libraries.
10+
await google.maps.importLibrary('maps');
11+
12+
// Create the map.
13+
const mapElement = document.querySelector('gmp-map') as google.maps.MapElement;
14+
// Access the underlying map object.
15+
const innerMap = mapElement.innerMap;
1816
}
1917

2018
initMap();

0 commit comments

Comments
 (0)