karthi
karthi

Reputation: 85

Can we get only hotels details near me using google place api

I am new to google map and place API.I want to get the only information about hotel using google place API is it possible.

Upvotes: 2

Views: 7600

Answers (1)

abielita
abielita

Reputation: 13469

Before you can start working with the Google Places API, you must add a Google API key to your app. Check here the steps on how to get a key for your app. Once you have an API key, you can add it to your app's manifest as described in this guide.

Use Google Places API Web Service which allows you to query for place information on a variety of categories, such as hotels. You can search for places either by proximity or a text string. A Place Search returns a list of places along with summary information about each place; additional information is available via a Place Details query. You can also create a marker for each hotel found and if the user clicks a hotel marker, it will show the details of that hotel in an info window.

Here is an example that allows the user to find all hotels in a given place, within a given country. It then displays markers for all the hotels returned, with on-click details for each hotel.

Upvotes: 2

Related Questions