Android Google Places show places from bounds - android

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?

Related

Google Places Android

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

Android Google Place Picker autocomplete not showing nearby places

I use Google Place API in my app and I have a little issue with Place Picker autocomplete feature.
The autocomplete feature does not show nearby places, but places all around the world. For example when I search mcdonald it will show me McDonalds in the USA whereas I'm in France.
The interactive map with its list of nearby places are working great on the other hand, I can see nearby places. The issue is only with autocomplete feature.
I tried to set a LatLngBounds to the builder, but the result is the same. The interactive map is affected by the LatLngBounds but the autocomplete feature is not.
I don't know if it is the normal beahvior or not, the documentation on Place Picker is not really precise and does not mention that.
And I didn't see either in the doc if there is an option to disable autocomplete feature.
Do you guys have some recommandations for me ?
Add locationand radius parameters, and try searching again, e.g;
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Mcdonalds&key=API_KEY&location=48.992899,%202.522523&radius=100000
For more information https://developers.google.com/places/web-service/autocomplete

Google Places API Android find places via LatLng

I am trying to use the Google Places API on Android to find Universities on a map based on where you click.
So ideally I could feed the Places API a coordinate and it could tell me the Universities around this coordinate. The PlaceDetectionAPI only has .getCurrentPlace and I don't just want where the user is currently.
Any help will be greatly appreciated!
Thank you
You can use the Autocomplete API with "University" as a starting string to obtain nearby places that match that query.
Although that's not really the best solution, so you may want to get your own database of university coordinates and match them to your user's location.

Tutorial for getting nearest bars using Android Places API?

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.

Android application with maps and custom places

I want to make and Android app which has a map and a list of nearest custom places. By custom I mean places which may be not present in Google Places. What is the best way to do this?
At first I thought that Google Maps and Google Places List can be a good idea but I didn't like API keys (but if there is no other way I will deal with them) and I didn't quite understood the Adding Place part. How many Places can I add?
Are there any other services I can read about?
I believe that I don't have to implement nearest place search myself as it is a common task, I think.
If.. "by custom you mean places which may be not present in Google Places", then there should be no point in using the Google Places List (I assume you are talking about the Auto complete.) even if you like the API keys....
I think you should do handle and show your custom places outside of the Google Maps API logic. Like, create your custom list view somewhere outside of the Maps view, or overlay on top of it.

Categories

Resources