I wonder if there will be some API or web service that given a longitude and latitude, return me a list of names of places of interest nearby (coul’d be restaurants, hotels, etc). I’ve been searching Google and I find nothing interesting. Something that return a JSON object will be great 😉
Share
Koordinates has an API for lat/lng queries of arbitrary spatial datasets. The response can be XML, JSON or JSONP. See this page for info:
For example, any of the Points of Interest (POI) layers listed here can be queried using a latitude, longitude and search radius:
You can upload and use your own data for free, so if you find a more suitable set of data for your location you can add that too.
— EDIT: Example, more info after first comment —
For Cuba you’ll need to find/create your own Points of Interest dataset – for example, maybe grab a subset of the OpenStreetMap data for your area. Basically you’ll need to find/create a Shapefile point dataset to upload.
Once you’ve done that, you cna use the vector API linked above. For example, in New Zealand we have a good POI layer supplied by Zenbu:
Use the vector API to grab features within a certain radius. E.g. to find 10 nearest points within a kilometre of my (rough) location I can hit this endpoint (using a key I’ve generated for this answer. You can create your own API key for free):
The response looks like this: