Enterprise GIS Workbench, GeoJSON Zones & Deck.gl Analytics — Angular Standalone Components + TypeScript (@angular/google-maps, AdvancedMarkerElement, PlaceAutocompleteElement, Place, ElevationService)
An enterprise Web GIS spatial analytics workbench centered on New York City (40.73061, -73.98661), built with Angular Standalone Components, TypeScript, @angular/google-maps (GoogleMap, MapAdvancedMarker), deck.gl (GoogleMapsOverlay, ScatterplotLayer, HexagonLayer), Terra Draw (terra-draw + terra-draw-google-maps-adapter), and the Google Maps Platform (Maps JavaScript API, Places API (New), Elevation API).
- Dynamic Google Maps JS API Loader (
@googlemaps/js-api-loaderv2): UsessetOptions()+importLibrary()to loadcore,maps,marker,places, andelevationdynamically using runtime configuration served from/env-config.js(never hardcoded inenvironment.ts). - Official Angular Google Maps Integration (
@angular/google-maps): Renders<google-map>withmapId: 'DEMO_MAP_ID'andinternalUsageAttributionIds: ['gmp_git_agentsamples_v1.0.0'], plus<map-advanced-marker>for live civic reference hubs and search results. - Basemap Switcher: Instant switching across
roadmap,satellite,hybrid, andterrain. - GeoJSON District Boundary Layer (
google.maps.Data): 8 NYC infrastructure districts styled by capacity utilization (< 70%,70–84%,>= 85%) with smoothmap.fitBounds()zoom-on-select from either the map or sidebar directory. - WebGL-Accelerated deck.gl Analytics (
GoogleMapsOverlay): Visualizes 2,400 NYC infrastructure sensor points with toggleableScatterplotLayerandHexagonLayermodes, guarded by explicit WebGL2 availability checks so headless environments emit zero console errors. - Interactive Terra Draw Polygon Filtering: Uses
TerraDrawandTerraDrawGoogleMapsAdapter(isolatedData: true) for drawing, selecting, and editing custom study-zone polygons with real-time point-in-polygon telemetry and spherical polygon area computation (km²). - Terrain Elevation Inspector (
ElevationService): Queries surface elevation (min,mean,max, and DEMresolutionin meters) for the active district, custom Terra Draw zone, or NYC centroids. - Live Civic Reference Hubs (
Place.searchByText&PlaceAutocompleteElement): Populates NYC civic transit hubs at startup viaPlace.searchByTextand mounts a live<gmp-place-autocomplete>widget listening to thegmp-selectevent.
// Dynamically load Maps JS API libraries via @googlemaps/js-api-loader v2
setOptions({
key: apiKey,
v: 'weekly',
language: 'en',
region: 'US',
});
await Promise.all([
importLibrary('core'),
importLibrary('maps'),
importLibrary('marker'),
importLibrary('places'),
importLibrary('elevation'),
]);
// Map options passed to <google-map>
const mapOptions: google.maps.MapOptions = {
mapId: 'DEMO_MAP_ID',
internalUsageAttributionIds: ['gmp_git_agentsamples_v1.0.0'],
};- Open the Maps Demo Key portal.
- Sign in with any Google account (no billing card or Cloud project required).
- Accept the Maps Demo Project Terms when prompted.
- Generate/reveal your Demo Key and copy it.
Note: The Maps Demo Key has daily reset limits, is not intended for production usage, and covers Maps JavaScript API and Places API (New). For full Elevation API support and production deployments, use Option B.
- Create or select a project in the Google Cloud Console Credentials page.
- Enable Maps JavaScript API, Places API (New), and Elevation API.
- Restrict your key by HTTP referrer and API restrictions following the API Security Best Practices guide.
cp .env.example .env
# Edit .env and set GOOGLE_MAPS_API_KEY=<your_key>npm install --no-audit --no-fund
npx tsc --noEmit && node --check serve-dist.mjs
npm run build
node serve-dist.mjs --host 127.0.0.1 --port 4200Then open http://127.0.0.1:4200 in your browser.
- Maps JavaScript API Documentation
- Places API (New) Documentation
- Elevation API Documentation
- Terra Draw with Google Maps
- Google Maps Platform Terms of Service
static-vanilla-jsreact-vitenextjssveltekitvue-viteangular(current implementation)python-fastapinodejs-web
- Cost Notice: "Usage of Google Maps Platform products and services may incur costs against your Google Cloud project billing account." Requires a billed Google Cloud key for Elevation API (REST) (a Maps Demo Key covers Maps JS/Places/Routes/Geocoding/Weather prototyping only).
- API Key Restrictions: Restrict production keys by HTTP referrer (client) or IP address (server) and allowed APIs via Add API Key Restrictions.
- License Scope: Google-sourced code snippets are provided "as-is" under the Apache 2.0 License (applies to 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 use GMP content for AI/ML training. - Browse Catalog:
../README.md·../AGENTS.md·../../AGENTS.md·../../INDEX.md