I need to get the coordinates of the point in google maps where I click, this is with angle 4.
I need to get the coordinates of the point in google maps where I click, this is with angle 4.
I do not know if it's exactly what you're asking, but in my case, for maps with angular, I'm using Angular Maps ( link ).
And in the case of your query, in the HTML:
<agm-map [latitude]="lat" [longitude]="lng" (mapClick)="getMapClick($event)" (mapReady)="mapReady($event)"></agm-map>
In the component:
getMapClick(e) {
console.log(e.coods.lat, e.coods.lng);
}
I hope it's what you're looking for, anything do not hesitate to ask again. By the way, I would recommend reading the rules of Stackoverflow for the formulation of questions.