googlemaps / googlemaps/extended-component-library
gmp-map click event
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 22
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 8
Description
Hello everyone!
I am building an Angular App and I was trying to integrate this extended-component-library to make use of gmp-map component. I couldn't find a way to listen for user clicks on the gmp-map so I can get the exact LatLng where the user clicked, so that I can update the position of the gmp-advanced-marker component.
My goal is to have something like this in the html:
`
`
and in the component code:
`latLng = model({
lat: -33.86,
lng: 151.22,
});`
`updateMarker(event: google.maps.MapMouseEvent) {
if (event.latLng) {
this.latLng.set(event.latLng.toJSON());
}
}`
Can anyone provide me with some help in this direction?
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.