Skip to content
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

Marker title attribute has no effect #875

Closed
giswqs opened this issue Oct 3, 2021 · 4 comments
Closed

Marker title attribute has no effect #875

giswqs opened this issue Oct 3, 2021 · 4 comments

Comments

@giswqs
Copy link
Contributor

giswqs commented Oct 3, 2021

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
image

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
@sackh
Copy link
Contributor

sackh commented Oct 4, 2021

duplicate of - #676 ?

@giswqs
Copy link
Contributor Author

giswqs commented Oct 4, 2021

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)

@giswqs giswqs closed this as completed Jun 5, 2023
@schoulten
Copy link

schoulten commented Oct 23, 2024

Hey @giswqs, did you find a solution in ipyleaflet that works similar to folium Marker tooltip?

@giswqs
Copy link
Contributor Author

giswqs commented Oct 23, 2024

@schoulten Yes, I did.

See this example: https://github.com/opengeos/HyperCoast/blob/main/hypercoast/common.py#L1037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants