Skip to content

Commit 2626c01

Browse files
authored
fix: Refactor variable declarations in index.ts (#717)
The global DeckGL namespace declaration was causing the opening region tag to be stripped. I moved it below the other variable declarations and that fixes it.
1 parent b756afd commit 2626c01

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

samples/deckgl-heatmap/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
*/
66

77
/* [START maps_deckgl_heatmap] */
8+
// Initialize and add the map
9+
let map: google.maps.Map;
10+
// Use global types for Deck.gl components
11+
let heatmapLayer: deck.HeatmapLayer;
12+
let googleMapsOverlay: deck.GoogleMapsOverlay;
13+
let marker: google.maps.marker.AdvancedMarkerElement | undefined;
14+
let infoWindow: google.maps.InfoWindow;
15+
816
// Declare global namespace for Deck.gl to satisfy TypeScript compiler
917
declare namespace deck {
1018
class HeatmapLayer {
@@ -21,14 +29,6 @@ declare namespace deck {
2129
// Add other Deck.gl types used globally if needed
2230
}
2331

24-
// Initialize and add the map
25-
let map: google.maps.Map;
26-
// Use global types for Deck.gl components
27-
let heatmapLayer: deck.HeatmapLayer;
28-
let googleMapsOverlay: deck.GoogleMapsOverlay;
29-
let marker: google.maps.marker.AdvancedMarkerElement | undefined;
30-
let infoWindow: google.maps.InfoWindow;
31-
3232
async function initMap(): Promise<void> {
3333
// Progress bar logic moved from index.html
3434
var progress, progressDiv = document.querySelector(".mdc-linear-progress");

0 commit comments

Comments
 (0)