Skip to content

Mouse events do not correctly report their location when they are over a marker which contains a DivIcon. #1218

Open
@charliedaly

Description

@charliedaly

The following code shows the problem:

from ipyleaflet import Map, Marker, DivIcon

m = ipyleaflet.Map(center = (52, -8))

def handler(**kwargs):
    if kwargs['type'] == 'mousemove':
         print(kwargs)

icon = DivIcon(icon_size = [100, 100])

marker = Marker(location = (52, -8), icon = icon)

m.add(marker)
    
m.on_interaction(handler)
m

When the mouse is over the marker, it shows the coordinates of the marker rather than the mouse.

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