Search code examples
javascriptgoogle-mapswebgoogle-maps-api-3openstreetmap

How to get back informations about location or state from coordinates


I'm working on web application where i should be able to retreive informations of a specific place using only geo coordinates.Eg . I have a latitude and a longitude that are given and known but no other informations about the country,state,city,etc.Is it possible to retreive informations about the country,state,city with a kind of API that takes latitude and a longitudeas params and return some raw json that contains country,state,city of a given place?


Solution

  • There is a lot of APIs for this. Google for "reverse geocoding".

    Example:

    Google maps API