Skip to content

Leaflet popup/tooltip methods are not supported? #3992

Closed Answered by falkoschindler
cyberNKYX asked this question in Q&A
Discussion options

You must be logged in to vote

Here is an example demonstrating both bindTooltip as well as bindPopup:

@ui.page('/')
async def page():
    m = ui.leaflet(center=(51.5, 0.0))
    await m.initialized()
    marker = m.marker(latlng=(51.5, 0.0))
    m.run_layer_method(marker.id, 'bindTooltip', 'Marker')
    marker = m.marker(latlng=(51.5, 0.01))
    m.run_layer_method(marker.id, 'bindPopup', 'Popup')

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cyberNKYX
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3991 on November 15, 2024 08:02.