Skip to content

Example on event onClick implementation #101

Closed Answered by Michael-fore
Michael-fore asked this question in Help
Discussion options

You must be logged in to vote

I ended up just doing this as a work around

const onGoogleApiLoaded = ({ map, maps }) => { mapRef.current = map setMapReady(true) window.google.maps.event.addDomListener(mapRef.current, "click", (e) => { console.log(e.latLng.lat(),e.latLng.lng()) }) }

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@giorgiabosello
Comment options

@giorgiabosello
Comment options

@Michael-fore
Comment options

@Michael-fore
Comment options

Answer selected by Michael-fore
@giorgiabosello
Comment options

@Michael-fore
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants