Reputation: 3489
I'm working with angular-google-map.I'm receving JSON data of lattitude and longitude.I want to get address of given lat and long.Is there any npm package for reverse geocoding . I tried reverse-geocoding but no use .it returns compilation error. please help
Upvotes: 0
Views: 446
Reputation: 3560
Native geocoding in AGM is coming soon. The code is in master, waiting for the next release.
If you need geocoding right now, you can do it manually, by waiting for a mapReady
event
function geocode() {
new google.maps.Geocoder.geocode({});
}
<agm-map (mapReady)="geocode()">
If you get google
not recognized, add @types/googlemaps to package.json as per
Angular2 Cannot find namespace 'google'
Upvotes: 1