Hello everybody.
I'm trying to use the tooltip of a marker, but I get the following error:
TypeError Traceback (most recent call last)
<ipython-input-66-f36dbcbbaf43> in <module>()
25 popup=name,
---> 26 tooltip=name).add_to(m)
27
TypeError: __init__() got an unexpected keyword argument 'tooltip'
My code is very similar to the one displayed in the 'Getting Started':
m = folium.Map(
location=[-5.826592, -35.212558],
zoom_start=7,
tiles='Stamen Terrain'
)
folium.GeoJson(geo_json_data).add_to(m)
name = 'name'
tooltip = 'tooltip'
folium.Marker([polygon.centroid.y, polygon.centroid.x],
popup=name,
tooltip=tooltip).add_to(m)
I also try the tooltip in the CircleMarker, but although I don't receive any error, the tooltip simple doesn't show when I pass my mouse over it.
Anyone know if i'm doing something wrong??
My folium version is 0.5.0
Thanks very much,
Victor Hugo.
My folium version is 0.5.0
Tooltips are not in that release. You'll need to use the development version for that.
See https://github.com/python-visualization/folium/blob/master/CHANGES.txt#L9-L10
Please add an instruction of installing development version to the documentation
!pip install git+https://github.com/python-visualization/folium
man,
in you installation folium folder (C:Python27Libsite-packagesfolium)
replace this py files https://github.com/python-visualization/folium/tree/master/folium
only the this in that directory not subfolders that works for me and now i can use this tooltip feature.
Most helpful comment
Please add an instruction of installing development version to the documentation
!pip install git+https://github.com/python-visualization/folium