jupyter-widgets / ipyleaflet

A Jupyter - Leaflet.js bridge
https://ipyleaflet.readthedocs.io
MIT License
1.49k stars 363 forks source link

SplitMapControl not working locally #1066

Closed raybellwaves closed 1 year ago

raybellwaves commented 2 years ago

I tried to run https://ipyleaflet.readthedocs.io/en/latest/controls/split_map_control.html locally

I get a strange behavior where the slider does not work and it only drags the image underneath it. What information can I provide to help debug this?

https://user-images.githubusercontent.com/17162724/196764109-adc7d12d-ebea-4496-8378-006c25897b90.mov

martinRenou commented 2 years ago

I can replicate this issue as well. Something may have changed in LeafletJS that broke the SplitMap extension.

raybellwaves commented 2 years ago

I can replicate this issue as well. Something may have changed in LeafletJS that broke the SplitMap extension.

Is there a way to test against different versions of Leaflet? https://github.com/Leaflet/Leaflet/tags

martinRenou commented 2 years ago

The only thing you can try is downgrade ipyleaflet until the SplitMap control works again. Unless you want to try and make a dev install of ipyleaflet and downgrade LeafletJS in the source, which I would probably not recommend.

giswqs commented 2 years ago

I just ran into the same issue. Waiting for a fix.

jportolese commented 1 year ago

Same here. Has anyone found a version that doesn't have this issue?

jportolese commented 1 year ago

I had ipyleaflet 0.17.2 installed and it didn't work I tried 0.17.0, 16, 15, 14 and none of them make a difference. That goes back to June 17, 2021. Has this been an issue for longer than that?

BoineeloMoyo commented 1 year ago

Was the issue ever solved..? i have the same problem. What version of ipyleaflet works perfect with the splitmap

lachlanfrancis commented 1 year ago

I had this issue; and believe an update to the documentation is required (raised in #1115).
Adding dragging = False to my Map allowed the slider to work without trying to drag the base map.

m = Map(center=(42.6824, 365.581), zoom=5, dragging = False)

martinRenou commented 1 year ago

https://github.com/QuantStack/leaflet-splitmap has been released with I believe contains the patch required to fix this issue.

ipyleaflet would need to be rebuilt with this new version. Happy to review a PR if someone wants to tackle this!