Harlborn
Harlborn

Reputation: 63

Getting nearby places based on the User's current location

Can any one please suggest me to use any standard API to get the nearby hotel list based on the User GPS location.

Thanks in advance

Upvotes: 0

Views: 424

Answers (1)

Chris Green
Chris Green

Reputation: 4427

Using the Google Places API you could perform a Places Search Request where location is the users lat,lng and types=lodging to search for hotels:

https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=lodging&sensor=false&key=YOUR_API_KEY

You will need to follow the instructions here to obtain an API Key to use the service.

Upvotes: 1

Related Questions