ipyleaflet
ipyleaflet copied to clipboard
Marker title attribute has no effect
The documentation says that Marker
has the title
attribute for setting the tooltip, but it has no effect. Hoving over the marker does not show the tooltip.
https://ipyleaflet.readthedocs.io/en/latest/api_reference/marker.html
from ipyleaflet import Map, Marker
center = (52.204793, 360.121558)
m = Map(center=center, zoom=15)
marker = Marker(location=center, draggable=False)
marker.title = "This is tooltip"
m.add_layer(marker);
m
duplicate of - https://github.com/jupyter-widgets/ipyleaflet/issues/676 ?
I was looking for an ipyleaflet feature similar to the folium Marker tooltip attribute as shown below. I am not sure if it is feasible.
App: https://share.streamlit.io/dansbecker/weather-analytics/main Code: https://github.com/dansbecker/weather-analytics/blob/main/streamlit_app.py#L125
folium.CircleMarker(location=[city.lat, city.lon],
tooltip=f"{city.municipality}\n value: {city[field_to_color_by]}{metric_unit}",
fill=True,
fill_color=icon_color,
color=None,
fill_opacity=0.7,
radius=5,
popup = folium.Popup().add_child(
folium.features.VegaLite(city_graph)
)
).add_to(main_map)