as the package suggest components param is A grouping of places to which you would like to restrict your results. Currently, you can use components to filter by up to 5 countries. Countries must be passed as a two character, ISO 3166-1 Alpha-2 compatible country code. For example: components=country:fr would restrict your results to places within France. Multiple countries must be passed as multiple country:XX filters, with the pipe character (|) as a separator. For example: components=country:us|country:pr|country:vi|country:gu|country:mp would restrict your results to places within the United States and its unincorporated organized territories.
calling the api in postman works perfectly
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=hotel venezuela&key=key&components=country:ve
but with this package the components param is an string[] and i test with:
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@usuarez Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:
Environment
API: Places
placeAutocomplete
OS: Ubuntu Node: 18.13.0Steps to reproduce
placeAutocomplete
methodCode example
Stack trace
as the package suggest components param is A grouping of places to which you would like to restrict your results. Currently, you can use components to filter by up to 5 countries. Countries must be passed as a two character, ISO 3166-1 Alpha-2 compatible country code. For example: components=country:fr would restrict your results to places within France. Multiple countries must be passed as multiple country:XX filters, with the pipe character (|) as a separator. For example: components=country:us|country:pr|country:vi|country:gu|country:mp would restrict your results to places within the United States and its unincorporated organized territories.
calling the api in postman works perfectly
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=hotel venezuela&key=key&components=country:ve
but with this package the components param is an
string[]
and i test with:None of these works properly cuz i get results from other countries too and using the
strictbounds: true
kill my server