How can i get the location name when we visit the place


#1

I run one app for geolocation in that I got location latitude and longitude points. when we change the location we can update location it automatically changes, but I want the location name

I got the location longitude and latitude coordinate points but I want the location name,

how can I get the location name when visiting the place, using latitude and longitude points


#2

I think you’ll need to Google/Bing/whatever for “reverse geocoding”. Like this API: https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse


#4

And I want world peace, please arrange


#5

Hey @hariaravind10,

        let url = "http://maps.googleapis.com/maps/api/geocode/json?latlng=" + loc.latitude + "," + loc.longitude + "&sensor=true";

        this.http.get(url)
            .map(results => results.json())
            .subscribe(results => {
                    console.log("address " + results.results[0].formatted_address);
            }, error => {
                console.log("ERROR: ", error);
            });

Hope it helps!