I am trying to get a list of places of a certain type like restaurants, nearby a certain latlng. I looked into the Google Places SDK for android but I couldn't find anything for this use case. It has the autocomplete and current place search but nothing for searching a certain type of places for a reference location. The Places web API has this feature but I was wondering if it would be possible to achieve the same with the Android SDK for Places. Something like below. It's an example from the Places API
https://maps.googleapis.com/maps/api/place/findplacefromtext/output?parameters
Try to use google places Api
https://developers.google.com/places/web-service/search
Try to implement the below api with proper modification with your Your_API_KEY
Change Params: radius , type, location
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=restaurant&keyword=cruise&key=Your_API_KEY
Related
I want to create an android app like nearby places (Shops,travelling places, Restaurants, etc). How to get the basics of Place API for android? Can someone give me any recommendations or ideas?
App Feathers -
When user opened my app, It's should be show to the user whats near to his place whatever he go.
Any Recommendations?
Google places Nearby Search lets you search for places within a specified area. You can refine your search request by supplying keywords or specifying the type of place you are searching for.
More details : https://developers.google.com/places/web-service/intro
You can use below API:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=restaurant&keyword=cruise&key=YOUR_API_KEY
First read and implement Maps SDK for Android
and then basically you need coordinates of the places that you want to show user and the location of user. Good luck!
I tried hard to find the way to search places by setting query parameter along with type inGeoDataClient.getAutocompletePredictions()api.
But i could not find any way to find exact places with type or name as supplied query.
if i pass 'airport' it gives so many result like places having 'airport' in description or name.
I just need airports nearby from this api, Guys please help, only option till now is to use web services. But as an android developer i want to use android api.
Thanks in advance.
I want to get all the places from the current camera bounds of Google Maps.
I managed to do this using the AutoComplete API but I have to insert a query for it to work.
So to my question, is there a way to do this, either use AutoComplete API without query or some other way?
I would like to use the Places API to find the geocoordinates of the nearest bars using Google Places. I'd like to store around 15 of the nearest geocoordinates in an ArrayList. Does there exist a simple demo of how to accomplish this? More generally, I would like to see a quick and dirty concrete working example of how to use the Places API to query for locations.
This link will help you. https://developers.google.com/places/#PlaceSearches you can get all nearest locations using the goole api.
I want to get the default search functionality available in google maps on my android project.For example if i search "doctors in india" Gmaps will show many points, how can i get this work without using Itemized Overlay or by using some json request.Can somebody please suggest me an idea.
You could use Google Places API to get a JSON for your query.
If you are looking to avoid using any library or API (because you have to register to get the API key) you could just use a webview and put a maps.google url.
for example:
https://maps.google.com/?q=New+York&z=13&t=m&output=embed
or
https://maps.google.com/?q=near:doctors+in+india&z=13&t=m&output=embed
You will find that the parameters here are not documented ,Here is a link i found useful for the parameters.