File tree Expand file tree Collapse file tree 3 files changed +9
-16
lines changed
samples/web-components-map Expand file tree Collapse file tree 3 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22<!--
33 @license
4- Copyright 2019 Google LLC. All Rights Reserved.
4+ Copyright 2025 Google LLC. All Rights Reserved.
55 SPDX-License-Identifier: Apache-2.0
66-->
77<!-- [START maps_web_components_map] -->
1111
1212 < link rel ="stylesheet " type ="text/css " href ="./style.css " />
1313 < script type ="module " src ="./index.js "> </ script >
14+ < script
15+ src ="https://maps.googleapis.com/maps/api/js?key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&libraries=maps,marker&v=weekly "
16+ defer
17+ > </ script >
1418 </ head >
1519 < body >
1620 <!-- [START maps_web_components_map_gmpmap] -->
1721 < gmp-map
1822 center ="37.4220656,-122.0840897 "
1923 zoom ="10 "
2024 map-id ="DEMO_MAP_ID "
21- style ="height: 400px "
25+ style ="height: 500px "
2226 > </ gmp-map >
2327 <!-- [END maps_web_components_map_gmpmap] -->
24- <!--
25- The `defer` attribute causes the script to execute after the full HTML
26- document has been parsed. For non-blocking uses, avoiding race conditions,
27- and consistent behavior across browsers, consider loading using Promises. See
28- https://developers.google.com/maps/documentation/javascript/load-maps-js-api
29- for more information.
30- -->
31- < script
32- src ="https://maps.googleapis.com/maps/api/js?key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&libraries=maps,marker&v=weekly "
33- defer
34- > </ script >
3528 </ body >
3629</ html >
3730<!-- [END maps_web_components_map] -->
Original file line number Diff line number Diff line change 11/**
22 * @license
3- * Copyright 2019 Google LLC. All Rights Reserved.
3+ * Copyright 2025 Google LLC. All Rights Reserved.
44 * SPDX-License-Identifier: Apache-2.0
55 */
66
77// [START maps_web_components_map]
88// This example adds a map using web components.
9- async function initMap ( ) : Promise < void > {
9+ async function initMap ( ) {
1010 console . log ( 'Maps JavaScript API loaded.' ) ;
1111}
1212
Original file line number Diff line number Diff line change 11/**
22 * @license
3- * Copyright 2019 Google LLC. All Rights Reserved.
3+ * Copyright 2025 Google LLC. All Rights Reserved.
44 * SPDX-License-Identifier: Apache-2.0
55 */
66/* [START maps_web_components_map] */
You can’t perform that action at this time.
0 commit comments