0

I am building an Android app which can check in(Something quite like foursquare) to specific places (In this case restaurants),I am just wandering is there a way for me to get data in google maps?(location and name of the place) to my app's database?Adding places manually seems quite impractical as there are lot of places to be added into the database.If it can't what would be the best practical solution?

1 Answer 1

0

Actually there is, you can use Google Places API - Nearby Search Requests. From the docs:

Nearby Search Requests

A Nearby Search lets you search for places within a specified area.

You can see an example just below the optional parameters.

The following example is a search request for places of type 'restaurant' within a 500m radius of a point in Sydney, Australia, containing the word 'cruise' in their name:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&type=restaurant&name=cruise&key=YOUR_API_KEY

then to retrieve further details using a Place Details Request, as described in the reference Search Results parameter:

reference contains a unique token that you can use to retrieve additional information about this place in a Place Details request. Although this token uniquely identifies the place, the converse is not true. A place may have many valid reference tokens. It's not guaranteed that the same token will be returned for any given place across different searches.

Note: The reference is now deprecated in favor of place_id.

Hope this helps you in some way. Good luck. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.