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

autocomplete: add support for locationbias and locationrestriction parameters #1011

Open
saeltz opened this issue Jul 21, 2023 · 3 comments
Open
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@saeltz
Copy link

saeltz commented Jul 21, 2023

Is your feature request related to a problem? Please describe.
Imagine having a rectangle for which you want to use placeAutocomplete to autocomplete places. Currently, only using the epicentre and radius is supported. This yields to many irrelevant autocompletions outside of the rectangle.

Describe the solution you'd like
The Google Maps SDK for Place Autocomplete supports setBounds with a southwest and northeast coordinate, see the documentation. It'd be awesome for this library to support that as well.

Describe alternatives you've considered
Now we're using the alternative with radius and filtering afterwards if an autocompletion is within our rectangle. That is an inefficient solution, both looking at requests, API costs and code.

Additional context
We'd be willing to support on the implementation when given some guidance.

@saeltz saeltz added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jul 21, 2023
@wangela
Copy link
Member

wangela commented Jul 21, 2023

If you would like to upvote the priority of this issue, please comment below or react with 👍 so we can see what is popular when we triage.

@saeltz Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@ChloeConstantineau
Copy link

ChloeConstantineau commented Jul 21, 2023

Would love this feature as well!
Might add that the locationRestriction parameter would also be very valuable here.

@usefulthink
Copy link
Contributor

As you already mentioned, the only supported options right now are radius and location. But there are the locationbias and locationrestriction parameters available that this library doesn't support at the moment that would cover your use-case. (see https://developers.google.com/maps/documentation/places/web-service/autocomplete?hl=en)

@usefulthink usefulthink added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Oct 10, 2023
@usefulthink usefulthink changed the title Support setBounds for placeAutocomplete autocomplete: add support for locationbias and locationrestriction parameters Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants