Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion samples/deckgl-heatmap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright 2019 Google LLC. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
-->
<!--[START maps_deckgl_heatmap]-->
<html>
<head>
<title>deck.gl HeatmapLayer and Google Maps Platform</title>
Expand Down Expand Up @@ -71,4 +72,5 @@ <h4>Bike Parking Spaces</h4>
({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"});</script>

</body>
</html>
</html>
<!--[END maps_deckgl_heatmap]-->
5 changes: 2 additions & 3 deletions samples/deckgl-heatmap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2025 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

/* [START maps_deckgl_heatmap] */
// Declare global namespace for Deck.gl to satisfy TypeScript compiler
declare namespace deck {
class HeatmapLayer {
Expand All @@ -20,7 +20,6 @@ declare namespace deck {
// Add other Deck.gl types used globally if needed
}


// Initialize and add the map
let map: google.maps.Map;
// Use global types for Deck.gl components
Expand All @@ -45,7 +44,6 @@ async function initMap(): Promise<void> {
};
}


// The location for the map center.
const position = {lat:37.77325660358167, lng:-122.41712341793448}; // Using the center from original deckgl-polygon.js

Expand Down Expand Up @@ -197,3 +195,4 @@ async function initMap(): Promise<void> {
}

initMap();
/* [END maps_deckgl_heatmap] */
6 changes: 3 additions & 3 deletions samples/deckgl-heatmap/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2025 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* [START maps_add_map] */
/* [START maps_deckgl_heatmap] */
/*
* Always set the map height explicitly to define the size of the div element
* that contains the map.
Expand All @@ -26,7 +26,6 @@ body {
position: relative; /* Set body as positioning context */
font-family: 'Roboto', Arial, sans-serif; /* Set font family */
}
/* [END maps_add_map] */

#toggleButton {
position: absolute;
Expand Down Expand Up @@ -101,4 +100,5 @@ margin:10px;
transform: translateX(-50%); /* Adjust for centering */
top: auto; /* Remove top positioning */
}
}
}
/* [END maps_deckgl_heatmap] */