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

Adds onClick prop handler #140

Merged
merged 2 commits into from
Dec 6, 2016
Merged

Adds onClick prop handler #140

merged 2 commits into from
Dec 6, 2016

Conversation

forrert
Copy link
Contributor

@forrert forrert commented Oct 22, 2016

This PR adds a new prop to the component that allows to subscribe to click events on the map. The handler is called with the map coordinates (longitude / latitude) as well as with the screen coordinates (x / y).

A new example demonstrating the onClick property as well as the existing onClickFeatures was added.

@toabey
Copy link

toabey commented Oct 22, 2016

👍

adds a property `onClick` that allows adding a handler
to be called with the coordinates when the map is clicked.

refs visgl#49
@tsemerad
Copy link
Contributor

tsemerad commented Nov 1, 2016

This is great! I was just about to make a PR for this myself - I have a fork with the exact same new onClick prop written nearly the same way. +1 for this.

@abmai
Copy link
Contributor

abmai commented Dec 6, 2016

#49

@abmai abmai merged commit 9e8eff2 into visgl:master Dec 6, 2016
cl0ckwork pushed a commit to cl0ckwork/react-map-gl that referenced this pull request Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants