Reputation: 390
hii everyone I am new in android and I don't have any idea about Google map api for android my question is that in my Android App I want to implement Google map which can search only hospital in a specific radius from users current location so now please tell me what kind of api I need to use to achieve this thank you
Upvotes: 1
Views: 460
Reputation: 13469
You need to use the Google Places API Web Service. It allows you to query for place information on a variety of categories, such as: establishments, prominent points of interest, geographic locations, and more.
Here is an example of a search request for places of type 'food' 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&types=food&name=cruise&key=YOUR_API_KEY
Note that you'll need to replace the key in this example with your own key in order for the request to work in your application.
Check this SO question on how to return the closest 20 location to the users current location.
Upvotes: 1