This repository implements an Enterprise Web GIS Workbench using Node.js + Express + TypeScript and modern Google Maps Platform APIs. All future modifications MUST preserve the zero-deprecation and security rules below.
- Maps JavaScript API Loader v2:
@googlemaps/js-api-loaderfunctionalsetOptions()+importLibrary()(core,maps,marker,places,elevation). - Map Initialization:
google.maps.MapwithmapId: 'DEMO_MAP_ID'andinternalUsageAttributionIds: ['gmp_git_agentsamples_v1.0.0']. - Markers:
AdvancedMarkerElementpaired withPinElement(passingPinElementdirectly tocontentand usingglyphText/glyphSrc). - Autocomplete:
PlaceAutocompleteElement(<gmp-place-autocomplete>) listening togmp-select, convertingevent.placePrediction.toPlace(), and callingplace.fetchFields(...). - GeoJSON & Drawing:
map.data(Datalayer) for NYC district boundary polygons, and Terra Draw (terra-draw+terra-draw-google-maps-adapterwithisolatedData: true) for interactive polygon study zones. - High-Density Visualization: deck.gl
GoogleMapsOverlay(ScatterplotLayerandHexagonLayer) with WebGL2 availability guards so headless environments emit zero console errors. - Places & Elevation BFF Proxies (
src/server.ts):POST /api/places/search->https://places.googleapis.com/v1/places:searchTextwithX-Goog-Api-Keyand explicitX-Goog-FieldMask.POST /api/elevation->https://maps.googleapis.com/maps/api/elevation/jsonprojecting onlyelevation,location,resolution, andstatus.
- Routing (if added in future extensions): MUST use
Route.computeRoutes(importLibrary('routes')) orroutes.googleapis.com/directions/v2:computeRoutes.
- NEVER use
google.maps.Marker-> useAdvancedMarkerElement. - NEVER use
google.maps.places.Autocomplete,SearchBox,PlacesService, orAutocompleteService-> usePlaceAutocompleteElement(gmp-select),Place.searchByText, orPlace.searchNearby. - NEVER listen to retired
gmp-placeselect-> always usegmp-select. - NEVER use
DirectionsService,DirectionsRenderer, orDistanceMatrixService-> useRoute.computeRoutesor Routes API v2. - NEVER use
google.maps.visualization.HeatmapLayerorgoogle.maps.drawing-> use deck.gl and Terra Draw. - NEVER use
@googlemaps/js-api-loaderv1new Loader(...).load()-> usesetOptions()+importLibrary(). - NEVER use
PinElement.elementorPinElement.glyph-> passPinElementdirectly and useglyphText/glyphSrc. - NEVER install banned wrappers (
google-map-react,@react-google-maps/api,use-places-autocomplete,@googlemaps/react-wrapper,@googlemaps/extended-component-library). - NEVER call
googleapis.comREST endpoints directly from clientfetch()(CORS trap) -> proxy throughsrc/server.ts. - NEVER use
innerHTML,outerHTML,document.write, orinsertAdjacentHTMLinpublic/-> usedocument.createElement(),textContent, andreplaceChildren(). - NEVER hardcode API keys or bind the Express server to
0.0.0.0(always bind to127.0.0.1).
- Solution:
spatial-intelligence— Enterprise GIS Workbench, GeoJSON Zones & Deck.gl Analytics (Advanced Spatial Analytics & 3D) - Framework:
nodejs-web(Node.js + Express + TypeScript Backend + Interactive Web Frontend) - Transport Mode: Full-Stack Server BFF
- API Key Tier: Billed Google Cloud key required (Elevation API (REST))
- Environment Variable:
GOOGLE_MAPS_API_KEYin.env - Detected JS Libraries:
core,elevation,maps,marker,places - Geo Libraries:
deck.gl,terra-draw - Server
/api/*Proxy Routes:/api/elevation,/api/places/search
- Map & Markers:
public/app.js,scripts/vendor-entry.mjs - Places, Routes & Geo Services:
public/app.js - Backend API Proxy:
src/server.ts - App Entry & Config:
public/index.html
# Install
npm install --no-audit --no-fund
# Typecheck
npx tsc --noEmit
# Build
npm run build
# Serve (loopback 127.0.0.1)
node dist/server.js --host 127.0.0.1 --port 4178- Parent Solution:
../README.md·../AGENTS.md·../verification_report.md - Catalog Routers:
../../AGENTS.md·../../BY_API.md·../../BY_FRAMEWORK.md·../../INDEX.md - Other Frameworks:
static-vanilla-js,react-vite,nextjs,sveltekit,vue-vite,angular,python-fastapi