Get coordinates with click on google maps, angle 4,5,6 [closed]

-2

I need to get the coordinates of the point in google maps where I click, this is with angle 4.

    
asked by Leandro Ricardo 01.10.2018 в 14:01
source

1 answer

1

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.

    
answered by 01.10.2018 / 16:06
source