PH88
PH88

Reputation: 1806

Google Places API Place.TYPE_ADDRESS missing?

Using Google Places API for Android, I'd like to know how to create an AutocompleteFilter of type address. Specifically I don't know what value(s) to use for the placeTypes parameter in the AutocompleteFilter.create method (see https://developer.android.com/reference/com/google/android/gms/location/places/AutocompleteFilter.html).

According to documentation (https://developers.google.com/places/supported_types#table3), the supported types are:

For geocode and establishment, the type values are defined in the Place class, namely Place.TYPE_GEOCODE and Place.TYPE_ESTABLISHMENT. But there is no Place.TYPE_ADDRESS.

Upvotes: 2

Views: 928

Answers (2)

Andrew Gulik
Andrew Gulik

Reputation: 26

I (and many others) have also noticed this. Unfortunately, it looks like address is not supported. See here:

https://github.com/googlesamples/android-play-places/issues/6#issuecomment-114951775

Upvotes: 1

Verma
Verma

Reputation: 8429

It would be something like this

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Vict&types=address&key=API_KEY

Upvotes: 0

Related Questions