Reputation: 263
I am developing a node.js app using express and mongodb.
I need to retrieve the latitudes and longitudes nearby a specific latitude and longitude.
I need to know what should I implement to do this.
Thanks,
Upvotes: 0
Views: 389
Reputation: 1232
Places API Nearby Search is a web service that returns information about places using HTTP requests, that is, available on Google Maps Platform. As per the documentation, this API will let you search for places within a specified latitude and longitude. You can refine your search request by supplying keywords or specifying the type of place you are searching for.
For example, you want to search for nearby restaurants within 1500m radius of a point near Sydney, Australia: https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.865111,151.196121&radius=1500&type=restaurant&key=YOUR_API_KEY
Here are the different Place Types you can use to refine your search request. Please note that you need to get an API key to use the API and here is how you can get one.
I hope this helps!
Upvotes: 1