Skip to content

Move popup #1238

Open
Open
@lopezvoliver

Description

@lopezvoliver

Updating the location of a Popup should move it to that location, as seen in this jsfiddle:

ipyleaflet-popup-jsfiddle

But in ipyleaflet this doesn't work:

First setup the map:

import ipyleaflet
from ipywidgets import HTML

m = ipyleaflet.Map(center=[51.505, -0.09])
info = HTML("Hello world")

popup = ipyleaflet.Popup(
    location = [51.505, -0.09],
    child = info,
    close_button = True,
    auto_close=True,
    close_on_escape_key=True
)
m.add(popup)

m

Then try to update the popup location in another cell:

popup.location=[51.505, 0]

ipyleaflet-popup-notebook

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions