Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Places: PlaceAutocompleteType is missing values #877

Open
michael-ameri opened this issue Nov 23, 2022 · 2 comments
Open

Places: PlaceAutocompleteType is missing values #877

michael-ameri opened this issue Nov 23, 2022 · 2 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@michael-ameri
Copy link

Environment details

Library version: 2.1.2

Code example

PlacesApi.placeAutocomplete(someContext, "Zurich", new PlaceAutocompleteRequest.SessionToken())
            .types(PlaceAutocompleteType.ESTABLISHMENT)

2 issues:

  1. The PlaceAutocompleteType enum only covers a small subset of available types according to https://developers.google.com/maps/documentation/places/web-service/supported_types#table2
  2. There is no way to use multiple types, which is possible via REST calls.
@michael-ameri michael-ameri added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 23, 2022
@n10v
Copy link

n10v commented Aug 14, 2023

  1. The PlaceAutocompleteType enum only covers a small subset of available types according to https://developers.google.com/maps/documentation/places/web-service/supported_types#table2

Found workaround with .custom method:

PlacesApi.placeAutocomplete(someContext, "Zurich", new PlaceAutocompleteRequest.SessionToken())
            .custom("types", "route")
  1. There is no way to use multiple types, which is possible via REST calls.

You can chain calls to have multiple types:

PlacesApi.placeAutocomplete(someContext, "Zurich", new PlaceAutocompleteRequest.SessionToken())
            .types(PlaceAutocompleteType.ESTABLISHMENT)
            .types(PlaceAutocompleteType.ADDRESS)  

@n10v
Copy link

n10v commented Aug 15, 2023

Actually I just tried to chain calls and the last value overwrites the first one :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants