Viewed   162 times

So I have latitude and longitude Like 44.4647452 and 7.3553838. I need to get address like: Milan, Italy, str. Kennedy 89.

How I can do it?



Simply pass latitude, longitude and your Google API Key to the following query string, you will get a json array, fetch your city from there.,7.3553838&key=YOUR_API_KEY

Note: Ensure that no space exists between the latitude and longitude values when passed in the latlng parameter.

Click here to get an API key

Tuesday, September 13, 2022

Currently Google Maps JavaScript API doesn't expose any boundaries of geographic features. There is very old feature request in the public issue tracker to add this functionality, however it looks like Google didn't set high priority on this:

Feel free to star the public feature request to express your interest and subscribe to further updates from Google.

You can get polygons from other sources and add them to Google maps as additional layers.

The nice workaround to get polygons in GeoJSON format from OpenStreetMap is described in the following answer:


So, if you download the GeoJSON you will be able to add it to map using the data layer and its loadGeoJson() method:

You can style colors of GeoJSON objects and create info windows. Just read the aforementioned documentation.

I hope this helps!

Thursday, November 24, 2022

This is likely a Chrome browser issue.

The corresponding bug in the public issue tracker is

Feel free to star the bug to add your vote and subscribe to further updates.


As stated in Google issue tracker, the issue was fixed in Chrome 60. The corresponding bug was marked as Fixed on August 9, 2017.

Sunday, December 25, 2022

From a Geocoder object, you can call the getFromLocation(double, double, int) method. It will return a list of Address objects that have a method getLocality().

Geocoder gcd = new Geocoder(context, Locale.getDefault());
List<Address> addresses = gcd.getFromLocation(lat, lng, 1);
if (addresses.size() > 0) {
else {
   // do your stuff
Thursday, December 22, 2022


Geocoder gcd = new Geocoder(this, Locale.getDefault());
List<Address> addresses = null;
try {
    addresses = gcd.getFromLocation(lat, lng, 1);
} catch (IOException e) {
if (addresses != null && addresses.size() > 0) {
    String locality = addresses.get(0).getLocality();
Friday, August 12, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :