Skip to content
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

Interaction events #12

Open
cardinalgeo opened this issue Mar 19, 2023 · 2 comments
Open

Interaction events #12

cardinalgeo opened this issue Mar 19, 2023 · 2 comments

Comments

@cardinalgeo
Copy link
Contributor

cardinalgeo commented Mar 19, 2023

Hey folks!

I'd like to be able to set up interaction events where a mouse click outputs the coordinates of the click position. The leaflet documentation here indicates this is possible on their side, as is the case for vue-leaflet (e.g., tip in the docs here and example here). However, I've been unable to get this working in trame-leaflet. What is required to set this up (e.g., how do I pass the function corresponding to the event click, for say, LMap)?

@jourdain
Copy link
Collaborator

Should LMap(click=(py_fn, "[$event]"), ...) work?

But it seems that those events are not registred here, so you will have to add it dynamically by passing LMap(..., __events=["click"]).

@cardinalgeo
Copy link
Contributor Author

Hi @jourdain — apologies for the delay, I got caught up in some other aspects of this project! I will give your suggestion a try and report back :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants