[Bug] Subsequent `GoogleMapsOverlays` fail to render after an overlay has been added then removed when `interleaved=true`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Description
I've got an app where you can toggle a heatmap on and off, it's not on by default - I've got a component which is functionally identical to the DeckGLOverlay one in https://deck.gl/docs/api-reference/google-maps/google-maps-overlay
Which works fine when interleaved=false but when it's true the second GoogleMapsOverlay will never render.
I've tried calling overlay.finalize() instead of & in addition to overlay.setMap(null) with no change.
There's no error logged to the console & debugging shows that a new GoogleMapsOverlay is being created is getting .setMap called on it properly.
Flavors
- Script tag
- React
- Python/Jupyter notebook
- MapboxOverlay
- GoogleMapsOverlay
- CARTO
- ArcGIS
Expected Behavior
I'd expect interleaved=true to behave like interleaved=false is, in that the DeckGLOverlay component can be removed from the map then re-added and still work.
Steps to Reproduce
I don't think there's a codepen for https://deck.gl/docs/api-reference/google-maps/google-maps-overlay, but modifying it so the DeckGLOverlay component is rendered conditionally based on a toggle should be enough to cause the issue & see it happening.
Environment
- Framework version:
"deck.gl": "^9.2.10",
"@deck.gl/google-maps": "^9.2.10", - Browser: Chrome v145
- OS: MacOS 26.3
Logs
N/A - no errors
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by modifying the GoogleMapsOverlay documentation example so the DeckGLOverlay is conditionally rendered by a toggle, then compare its behavior with interleaved=false. The issue is fixed when removing and re-adding the overlay with interleaved=true renders it again without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100