python-visualization / folium

Python Data. Leaflet.js Maps.
https://python-visualization.github.io/folium/
MIT License
6.94k stars 2.23k forks source link

When using MeasureControl, the mouse selection jumps off the map #1835

Closed Magic-IP closed 1 year ago

Magic-IP commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

I cannot manage to use MeasureControl properly, as when I select the first point it jumps off the map in some other location. The following code I am testing. It is your test in the website. It works on your website but when I use it in my jupythernotebook it does not work properly. My python version is 3.1.

To Reproduce

import folium from folium.plugins import MeasureControl

m = folium.Map([-27.5717, -48.6256], zoom_start=10)

m.add_child(MeasureControl())

m

[ Include a code snippet that produces your bug. Make it standalone, we should be able to run it. ]

[ Include a data sample or link to your data if necessary to run the code ]



**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
 - Browser [e.g. chrome, firefox]
 - Jupyter Notebook or html files?
 - Python version (check it with `import sys; print(sys.version_info)`)
 - folium version (check it with `import folium; print(folium.__version__)`)
 - branca version (check it with `import branca; print(branca.__version__)`)

**Additional context**
Add any other context about the problem here.

**Possible solutions**
List any solutions you may have come up with.

folium is maintained by volunteers. Can you help making a fix for this issue?
Magic-IP commented 1 year ago

Already existed.

AlineGobbi commented 12 months ago

upgrade to folium 0.15.0