We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
The text was updated successfully, but these errors were encountered:
This happens even when the DivIcon is covered by another marker. In the following case, it's covered by a CircleMarker:
from ipyleaflet import Map, Marker, DivIcon, CircleMarker m = Map(center = (52, -8)) def get_handler(m): m.coords = None def handler(**kwargs): if kwargs['type'] == 'mousemove': if m.coords == kwargs['coordinates']: print('.', end='') else: m.coords = kwargs['coordinates'] print(kwargs) return handler icon = DivIcon(icon_size = [100, 100]) marker = Marker(location = (52, -8), icon = icon) cm = CircleMarker(location = (52, -8), radius = 80) m.add(marker) m.add(cm) m.on_interaction(get_handler(m)) m
The mouse coordinates are correctly reported everywhere except where the DivIcon is.
Sorry, something went wrong.
No branches or pull requests
The following code shows the problem:
When the mouse is over the marker, it shows the coordinates of the marker rather than the mouse.
The text was updated successfully, but these errors were encountered: