-
Notifications
You must be signed in to change notification settings - Fork 364
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
Cursor position #332
Comments
There is a notebook on the repo that does it for displaying the cursor position in a from ipywidgets import Label
from ipyleaflet import Map
m = Map()
label = Label()
display(label)
def handle_interaction(**kwargs):
if kwargs.get('type') == 'mousemove':
label.value = str(kwargs.get('coordinates'))
m.on_interaction(handle_interaction)
m |
Thanks for the quick response. What if I don't want the Earth coordinates, but rather raw offset values from the viewer's |
I guess you would need to compute them yourself, given the cursor position, the |
Oh yeah, definitely! |
This is just great, amazing, so simple, thank you @martinRenou!!! |
Hi. How do I get the cursor position out of the map? Thank you.
The text was updated successfully, but these errors were encountered: