Skip to content

Explore editable deck.gl overlays on Google Maps 3D Map3DElement #10402

Description

@charlieforward9

Context

We need an editable Google Maps 3D surface that can eventually host Strava-quality GeoJSON editing on top of google.maps.maps3d.Map3DElement without falling back to a different basemap. The goal is to reuse the deck.gl / editable-layers interaction model through an adapter, not rebuild all drawing/editing behavior from scratch.

Relevant starting point:

Current Prototype

  • GoogleMapsOverlay#setMap accepts gmp-map-3d / Map3DElement in addition to google.maps.Map.
  • Map3D adapter derives deck view state from center, range, heading, tilt, and fov.
  • Map3D camera events trigger redraws.
  • A passive WebGL context capture hook records a Map3D WebGL context if Google creates one after the overlay is constructed.
  • If capture fails, the overlay warns and falls back to a non-interleaved DOM deck canvas instead of touching Google GL state.
  • Focused tests cover Map3D detection, camera view-state derivation, and safe fallback when internals are not captured.

Local Demo Command

cd /Users/rich/Code/visgl/_worktrees/google-maps-3d-overlay-prototype
ln -s /Users/rich/Code/visgl/deck.gl/node_modules node_modules 2>/dev/null || true
export GoogleMapsAPIKey=<localhost-allowed Maps JS key>
cd examples/website/google-map-3d-overlay-prototype
../../../node_modules/.bin/vite --config ../../vite.config.local.mjs --host 127.0.0.1 --port 8093

Open: http://127.0.0.1:8093/

Current Blocker

  • The local demo boots, loads gmp-map-3d, and reaches the overlay fallback path.
  • The available NEWHEAT key is valid but rejects this standalone origin with RefererNotAllowedMapError on 127.0.0.1 and localhost.
  • A second local key candidate was invalid for Maps JS.
  • Need a Maps JS key whose HTTP referrers allow the standalone dev origin, or a permitted local host/origin setup.

Rabbit Hole / Next Steps

  • Verify visible alignment in the local demo once the key/origin blocker is cleared.
  • Decide whether Map3D should start in non-interleaved overlay mode by default until shared-GL draw-after-Google-render can be proven.
  • Extend the adapter to expose enough picking/event data for editable-layers handles.
  • Prototype EditableGoogleMap3DLayer as an adapter over editable-layers rather than a new editor.
  • Use native Map3D polylines/polygons as visual comparison only; deck.gl should remain the editable layer engine.
  • Keep the initial implementation local/prototype until the adapter is stable enough for upstream review.

References

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions