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
Related
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
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 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 am using Google map in my application it shows places in it's suggested area and if i click it, it shows route as my expectation but it never show me any cafe in it's suggestions.
So my question is that, how i get that kind of suggestions from map?
is there any library for that?
Take a look at Google Places API
https://developers.google.com/places/?csw=1
A short tutorial: http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/
OR
http://code.tutsplus.com/tutorials/android-sdk-working-with-google-maps-application-setup--mobile-15771
How can I use Google maps in Android app so that it only shows my country?
I mean so that the rest of the world is not featured in the application.
Check out one of Mike Williams' great GMaps tutorials - he shows you how to limit zoom and pan in your map.
If you want some areas to be non-visible, you can try this one: I think that's closest to what you want (the example actually does a similar thing to what you want, using USA as the example).