Closed rodmerritt closed 7 years ago
of course. something like this should work:
<Gmaps onClick={(event)=>console.log('click', event.latLng.lat(), event.latLng.lng())} />
Thanks for your answer @endziu, it works exactly like that.
@rodmerritt this package supports all the map events out of the box, and you can attach the handlers using the onEventName
pattern.
Your handlers will receive the same parameters the Google SDK is passing, for example the click event receives the following parameter:
https://developers.google.com/maps/documentation/javascript/3.exp/reference#MouseEvent
Is there a way to get long/lat from a click event on the Map component?