Skip to content

Error when using the tooltip in a Marker #763

@vhfdoliveira

Description

@vhfdoliveira

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions