visgl / visgl/deck.gl

[Bug]GoogleMapsOverlay, Add layer again after delete, can't add

Open
#8,018 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

setMap(map) -> setMap(null) -> setMap(map)
add layer again after delete, can't add

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

No response

Steps to Reproduce

const deckOverlay = new GoogleMapsOverlay({
layers: [jsonlayer],
});

deckOverlay.setMap(map);

setTimeout(() => {
deckOverlay.setMap(null);
}, 5000);

setTimeout(() => {
deckOverlay.setMap(map);
}, 10000);

Environment
  • Framework version: deck.gl/core@8.9.22, deck.gl/layers@8.9.22, deck.gl/google-maps@8.9.22
  • Browser: Chrome 114.0.5735.198
  • OS: MacOS 12.5.1
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the GoogleMapsOverlay.setMap(map) and setMap(null) entry points and reproduce the reported attach, detach, and reattach sequence. Check how the overlay handles its existing layers after reattachment; done means the same jsonlayer can be displayed again after setMap(null) followed by setMap(map).

Written by the indexing model from the issue text.

Assessment

Tech stack
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.