-
-
Notifications
You must be signed in to change notification settings - Fork 855
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
Filtering by types does not work #686
Comments
Thanks for the bug report. I can confirm that it doesn't work as expected. PRs welcome! |
I had the same problem with filtering by type <GooglePlacesAutocomplete
placeholder="Vyhledat adresu"
onPress={async (data, details) => {
...
}}
query={{
key: "...",
language: "cs",
components: "country:cz",
types: "address",
}}
/> Results included cities, companies, etc. instead of just addresses. I found a typo in the library in `${url}/place/autocomplete/json?&input=` + should be `${url}/place/autocomplete/json?input=` + This fixed my problem. Will be opening a pull request with a fix. |
replaced ?&input with ?input, this should fix filtering by type FaridSafi#686
i was able to get it working with cities by adding the fix @fedor-moiseev recommended and using query={{ types: '(cities)',}} in |
replaced ?&input with ?input, this should fix filtering by type #686
I'm having the same issue with
any workarounds on this? |
Some of these issues may be because of invalid place types, such as "restaurants". According to the Google Autocomplete API, you're limited to a subset of Place 'types' you can refer to: https://developers.google.com/maps/documentation/places/web-service/autocomplete#types |
Describe the bug
I am trying to filter by schools using the GooglePlacesSearchQuery property but it does not have any affect.
Reproduction - (required - issue will be closed without this)
Additional context
Library Version: 2.1.2
React Native Version: 0.63.2
[ X] iOS
Android
Web
I am using expo
The text was updated successfully, but these errors were encountered: