Skip to content

Commit 0ead7f1

Browse files
authored
fix: Adds missing region tags to samples. (#679)
* fix: Adds missing region tags to samples. * Update index.ts fixes mistake with opening region tag ("format violation??") * Update index.ts Fixes the region tag for reals this time.
1 parent 9abcbda commit 0ead7f1

File tree

9 files changed

+24
-15
lines changed

9 files changed

+24
-15
lines changed

samples/deckgl-kml-updated/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Copyright 2025 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
7+
<!--[START maps_deckgl_kml_updated]-->
78
<html>
89
<head>
910
<title>deck.gl KMLLoader and Google Maps Platform</title>
@@ -65,4 +66,5 @@ <h3>Earthquake <br> Magnitude</h3>
6566
<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))})
6667
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
6768
</body>
68-
</html>
69+
</html>
70+
<!--[END maps_deckgl_kml_updated]-->

samples/deckgl-kml-updated/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2025 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
6+
/* [START maps_deckgl_kml_updated] */
77
// Import necessary loader
88
import { KMLLoader } from '@loaders.gl/kml';
99

@@ -220,3 +220,4 @@ async function initMap(): Promise<void> {
220220
}
221221

222222
initMap()
223+
/* [END maps_deckgl_kml_updated] */

samples/deckgl-kml-updated/style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2025 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
/* [START maps_add_map] */
6+
/* [START maps_deckgl_kml_updated] */
77
/*
88
* Always set the map height explicitly to define the size of the div element
99
* that contains the map.
@@ -26,7 +26,6 @@
2626
position: relative; /* Set body as positioning context */
2727
font-family: 'Roboto', Arial, sans-serif; /* Set font family */
2828
}
29-
/* [END maps_add_map] */
3029

3130
.tooltip {
3231
position: absolute;
@@ -68,4 +67,5 @@ h1 {
6867
height: 20px;
6968
margin-right: 10px;
7069
border: 1px solid #000; /* Border for color swatch */
71-
}
70+
}
71+
/* [END maps_deckgl_kml_updated] */

samples/deckgl-kml/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Copyright 2025 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
7+
<!--[START maps_deckgl_kml]-->
78
<html>
89
<head>
910
<title>deck.gl KMLLoader and Google Maps Platform</title>
@@ -61,4 +62,5 @@ <h1>Deck.gl KMLLoader</h1>
6162
<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))})
6263
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
6364
</body>
64-
</html>
65+
</html>
66+
<!--[END maps_deckgl_kml]-->

samples/deckgl-kml/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2025 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
6+
/* [START maps_deckgl_kml] */
77
// Import necessary loader
88
import { KMLLoader } from '@loaders.gl/kml';
99

@@ -208,3 +208,4 @@ function hexOrAabbggrrToRgba(color: string): number[] | null {
208208
}
209209

210210
initMap();
211+
/* [END maps_deckgl_kml] */

samples/deckgl-kml/style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2025 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
/* [START maps_add_map] */
6+
/* [START maps_deckgl_kml] */
77
/*
88
* Always set the map height explicitly to define the size of the div element
99
* that contains the map.
@@ -26,7 +26,6 @@
2626
position: relative; /* Set body as positioning context */
2727
font-family: 'Roboto', Arial, sans-serif; /* Set font family */
2828
}
29-
/* [END maps_add_map] */
3029

3130
.tooltip {
3231
position: absolute;
@@ -43,4 +42,5 @@
4342
h1 {
4443
text-align: center;
4544
margin:10px;
46-
}
45+
}
46+
/* [END maps_deckgl_kml] */

samples/deckgl-polygon/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Copyright 2019 Google LLC. All Rights Reserved.
55
SPDX-License-Identifier: Apache-2.0
66
-->
7+
<!--[START maps_deckgl_polygon]-->
78
<html>
89
<head>
910
<title>deck.gl PolygonLayer and Google Maps Platform</title>
@@ -71,4 +72,5 @@ <h1>Population Density</h1>
7172
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>
7273

7374
</body>
74-
</html>
75+
</html>
76+
<!--[END maps_deckgl_polygon]-->

samples/deckgl-polygon/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2025 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
6+
/* [START maps_deckgl_polygon] */
77
// Declare global namespace for Deck.gl to satisfy TypeScript compiler
88
declare namespace deck {
99
class PolygonLayer {
@@ -144,3 +144,4 @@ async function initMap(): Promise<void> {
144144
}
145145

146146
initMap();
147+
/* [END maps_deckgl_polygon] */

samples/deckgl-polygon/style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2025 Google LLC. All Rights Reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
/* [START maps_add_map] */
6+
/* [START maps_deckgl_polygon] */
77
/*
88
* Always set the map height explicitly to define the size of the div element
99
* that contains the map.
@@ -26,7 +26,6 @@
2626
position: relative; /* Set body as positioning context */
2727
font-family: 'Roboto', Arial, sans-serif; /* Set font family */
2828
}
29-
/* [END maps_add_map] */
3029

3130
#toggleButton {
3231
position: absolute;
@@ -82,4 +81,5 @@ h1 {
8281
height: 15px;
8382
margin-right: 5px;
8483
border: 1px solid #000; /* Add a border to the color box */
85-
}
84+
}
85+
/* [END maps_deckgl_polygon] */

0 commit comments

Comments
 (0)