Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3311940
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:56:08+00:00 2026-05-17T21:56:08+00:00

I need a list of countries, states & cities based on a collection of

  • 0

I need a list of countries, states & cities based on a collection of lat/long values I have. I need to store this information in a manner that hierarchy is preserve and without duplicates (e.g. “USA” and “United States” and “United States of America” are the same country; I only want one instance of this country in my database).

Is this possible to do with Google Map API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:56:09+00:00Added an answer on May 17, 2026 at 9:56 pm

    What you are looking for is called reverse geocoding. Google provides a server-side reverse geocoding service through the Google Geocoding API, which you should be able to use for your project.

    This is how a response to the following request would look like:

    http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false

    Response:

    {
      "status": "OK",
      "results": [ {
        "types": [ "street_address" ],
        "formatted_address": "275-291 Bedford Ave, Brooklyn, NY 11211, USA",
        "address_components": [ {
          "long_name": "275-291",
          "short_name": "275-291",
          "types": [ "street_number" ]
        }, {
          "long_name": "Bedford Ave",
          "short_name": "Bedford Ave",
          "types": [ "route" ]
        }, {
          "long_name": "New York",
          "short_name": "New York",
          "types": [ "locality", "political" ]
        }, {
          "long_name": "Brooklyn",
          "short_name": "Brooklyn",
          "types": [ "administrative_area_level_3", "political" ]
        }, {
          "long_name": "Kings",
          "short_name": "Kings",
          "types": [ "administrative_area_level_2", "political" ]
        }, {
          "long_name": "New York",
          "short_name": "NY",
          "types": [ "administrative_area_level_1", "political" ]
        }, {
          "long_name": "United States",
          "short_name": "US",
          "types": [ "country", "political" ]
        }, {
          "long_name": "11211",
          "short_name": "11211",
          "types": [ "postal_code" ]
        } ],
        "geometry": {
          "location": {
            "lat": 40.7142298,
            "lng": -73.9614669
          },
          "location_type": "RANGE_INTERPOLATED",
          "viewport": {
            "southwest": {
              "lat": 40.7110822,
              "lng": -73.9646145
            },
            "northeast": {
              "lat": 40.7173774,
              "lng": -73.9583193
            }
          }
        }
      },
    
      ... Additional results[] ...
    

    You can also opt to receive the response in xml instead of json, by simply substituting json for xml in the request URI:

    http://maps.googleapis.com/maps/api/geocode/xml?latlng=40.714224,-73.961452&sensor=false

    As far as I know, Google will also return the same name for address components, especially for high-level names like country names and city names. Nevertheless, keep in mind that while the results are very accurate for most applications, you could still find the occasional spelling mistake or ambiguous result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of cities, states/provinces, and countries and I need to find
I have an app where I need to get the list of countries,languages etc
We have a list containing names of countries. We need to find names of
I have a long list of city names and countries and I would like
Need a list of Pcap.Net members or classes? Their website doesn't have much documentation
Hi In a application i need to list all countries in the world ,
I need to localize an application and have noticed that several countries don't appear
I have a list box, filled with countries. A user can select multiple countries
I have a table that is a list of countries, with two fields, ID
Basically what I need to know is this: I have to show a drop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.