-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SideBySideLayers plugin not working #1730
Comments
Hi @giswqs I was able to fix the issue by pinning to an older version of the minified js. Can you verify if this fixes your problem as well? import folium
from folium import plugins
class FixedSideBySideLayers(plugins.SideBySideLayers):
default_js = [
(
"leaflet.sidebyside",
"https://cdn.jsdelivr.net/gh/digidem/leaflet-side-by-side@2.0.0/leaflet-side-by-side.min.js",
),
]
m = folium.Map(location=(30, 20), zoom_start=4)
layer_right = folium.TileLayer('openstreetmap')
layer_left = folium.TileLayer('cartodbpositron')
sbs = FixedSideBySideLayers(layer_left=layer_left, layer_right=layer_right)
layer_left.add_to(m)
layer_right.add_to(m)
sbs.add_to(m)
m |
@jtmiclat Yes, it works. |
Thanks for checking it! I opened a PR #1732 to merge the fix. |
Since #1732 was merged we can close this issue. |
Thanks for posting the issue and for the fix. I ran into the same thing with v0.14.0 - any plans to cut a new release tag with this fix? |
Hi Matt, valid question. I was planning to do a v1.0 release when the documentation was updated, which we merged this week, so we should get working on that release! |
Cool, congrats on the milestone! |
Describe the bug
The SideBySideLayers plugin for folium v0.14.0 is not working properly. The slider can't be moved.
@Conengmo @fralc
To Reproduce
https://colab.research.google.com/github/python-visualization/folium/blob/main/examples/Plugins.ipynb
It should work like this:
https://ipyleaflet.readthedocs.io/en/latest/controls/split_map_control.html
The text was updated successfully, but these errors were encountered: