Enterprise GIS Workbench, GeoJSON Zones & Deck.gl Analytics — Google Maps Platform Reference (Maps JS 2D, Places (New), Elevation, deck.gl, Terra Draw)
Category: Advanced Spatial Analytics & 3D | Solution ID:
spatial-intelligence| Agent Router:AGENTS.md| Catalog:../AGENTS.md·../BY_API.md·../INDEX.md
Enterprise Web GIS spatial analytics workbench centered on New York City (40.73061, -73.98661) integrating a 2D/Vector Google Map (mapId: DEMO_MAP_ID, internalUsageAttributionIds: ['gmp_git_agentsamples_v1.0.0']) with a live basemap switcher (roadmap, satellite, hybrid, terrain), a GeoJSON Data Layer rendering NYC infrastructure districts styled by capacity metrics with smooth fitBounds zoom-on-select, a WebGL-accelerated deck.gl GoogleMapsOverlay (ScatterplotLayer and HexagonLayer toggleable for ~2,400 infrastructure sensor points with graceful WebGL2 availability checks so headless environments emit zero console errors), an interactive Terra Draw polygon toolbar (terra-draw + terra-draw-google-maps-adapter) for custom study-zone filtering and point-in-polygon metrics computation, live Elevation API terrain profiling (ElevationService on client-only stacks; /api/elevation BFF proxy on full-stack frameworks), and live Places API (New) civic reference anchors (Place.searchByText / PlaceAutocompleteElement on client-only stacks; /api/places/search BFF proxy on full-stack frameworks) rendered via AdvancedMarkerElement.
Google Cloud Billing Key Required: Uses APIs not covered by the free Maps Demo Key (Elevation API (REST)). Enable these APIs on a billed Google Cloud project and restrict your key via API Key Restrictions.
- Map renders GeoJSON district polygons and high-density deck.gl spatial layers
- Basemap type switcher (roadmap, satellite, terrain) is functional
- Terra Draw toolbar allows drawing a custom polygon zone to filter spatial metrics in the sidebar
- Selecting a district zooms/fits the map bounds smoothly and displays zone analytics
- No console errors
- Canonical APIs & Libraries:
Maps JS 2D,Places (New),Elevation,deck.gl,Terra Draw - Maps JS Libraries Used (Union Across Stacks):
core,elevation,maps,marker,places - 3rd-Party Geo Libraries:
deck.gl,terra-draw - Photorealistic 3D Map (
<gmp-map-3d>): No (2D Vector Map withmapId)
| Method | Route | Upstream GMP Service | Header / FieldMask Rule | Purpose |
|---|---|---|---|---|
POST |
/api/places/search |
places.googleapis.com/v1/places:searchText |
X-Goog-Api-Key + X-Goog-FieldMask: places.id,places.displayName,places.formattedAddress,places.location,places.types |
Server-side BFF proxy for live NYC civic infrastructure seed query and spatial reference search via Places API (New) with X-Goog-Api-Key and explicit X-Goog-FieldMask, avoiding client-side CORS issues and key exposure. |
POST |
/api/elevation |
maps.googleapis.com/maps/api/elevation/json |
None (legacy GET ?path=...&key=) |
Server-side BFF proxy for querying terrain elevation (meters above mean sea level) across Terra Draw polygon vertices, zone centroids, and sampled points via the Elevation API REST endpoint, projecting only elevation, location, resolution, and status. |
| Framework | Transport Mode (Code-Detected) | Env Var | BFF Routes | Docs & Code | Screenshot |
|---|---|---|---|---|---|
static-vanilla-js |
Client + Local Server Proxy (server.mjs) |
GOOGLE_MAPS_API_KEY |
2 | README · AGENTS | PNG |
react-vite |
Client JS SDK | VITE_GOOGLE_MAPS_API_KEY |
0 | README · AGENTS | PNG |
nextjs |
Full-Stack Server BFF | NEXT_PUBLIC_GOOGLE_MAPS_API_KEY |
2 | README · AGENTS | PNG |
sveltekit |
Full-Stack Server BFF | PUBLIC_GOOGLE_MAPS_API_KEY |
2 | README · AGENTS | PNG |
vue-vite |
Client JS SDK | VITE_GOOGLE_MAPS_API_KEY |
0 | README · AGENTS | PNG |
angular |
Client + Local Server Proxy (serve-dist.mjs) |
GOOGLE_MAPS_API_KEY |
2 | README · AGENTS | PNG |
python-fastapi |
Full-Stack Server BFF | GOOGLE_MAPS_API_KEY |
2 | README · AGENTS | PNG |
nodejs-web |
Full-Stack Server BFF | GOOGLE_MAPS_API_KEY |
2 | README · AGENTS | PNG |
Full Playwright WebGL & ToS verification matrix: verification_report.md.
- Cost Notice: "Usage of Google Maps Platform products and services may incur costs against your Google Cloud project billing account." (Use a Maps Demo Key for zero-cost prototyping on supported APIs only.)
- API Key Restrictions: Restrict browser keys by HTTP referrer and server BFF keys by IP/API via Add API Key Restrictions.
- License Scope: Google-sourced code snippets are provided "as-is" under the Apache 2.0 License (covers Google-sourced snippets only, not the full generated project).
- Terms of Service: Subject to the Google Maps Platform Terms of Service, EEA Service Specific Terms, and Prohibited Territories. Do not cache non-
place_idPlaces data or train AI/ML models on GMP content.