How can we get the cursor coordinate using the onClick event on the map?
Here is how I'm trying:
```
_onClickMap(e) {
console.log(e.lngLat);
}
render() {
return
I would expect to be able to access thelngLat` property similarly to this example: https://www.mapbox.com/mapbox-gl-js/example/mouse-position/
Almost that, sorry it is not clear in the documentation, here is what you need:
_onClickMap(map, evt) {
console.log(evt.lngLat);
}
Thanks so much for this!
Thanks!!!
Could this be implemented in Kepler Gl? Do you have any guide in where should I add this?
Cool
how do i get only the longitude or the latitude?
Just read out the property you care about from evt.lngLat @SanHolo101
Thanks, You save my day
Most helpful comment
Almost that, sorry it is not clear in the documentation, here is what you need: