Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing SplitMapControl doesn't update the map layers #1233

Open
dfguerrerom opened this issue Oct 4, 2024 · 1 comment · May be fixed by QuantStack/leaflet-splitmap#14
Open

Removing SplitMapControl doesn't update the map layers #1233

dfguerrerom opened this issue Oct 4, 2024 · 1 comment · May be fixed by QuantStack/leaflet-splitmap#14

Comments

@dfguerrerom
Copy link

dfguerrerom commented Oct 4, 2024

Removing SplitMapControl doesn't update the map layers, if I remove this control, I would expect to leave the map as it was before of adding it? this, however doesn't happen in the MapView who triggered the event, but if I create a new view, it removes successfully the added layres.

To recreate

Screencast.from.04-10-2024.11.28.59.webm
from ipyleaflet import Map, TileLayer, SplitMapControl
center = [34.6252978589571, -77.34580993652344]
zoom = 10
m = Map(center=center, zoom=zoom)


left = TileLayer(
    url="https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"
)
right = TileLayer(
    url="https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"
)
control = SplitMapControl(left_layer=left, right_layer=right)
m.add(control)

And, then....

m.remove(control)
@dfguerrerom
Copy link
Author

Actually this issue had to be opened in https://github.com/QuantStack/leaflet-splitmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant