Status Update
Comments
ad...@gmail.com <ad...@gmail.com> #2
Example:
Issue:
Zipcode 00617 belongs to country PR ,it returns the Zero Results with Multiple country component filtering
But 00956,00714,00601 zipcode belongs to same country PR , it returns the expected response
I see a conflict of two different operations of same scenario .Either Both operations should work else wont
From Documentation (
If the request contains multiple country component filters, the API evaluates them as an AND, not an OR'
But here with Same scenario , one request returns a ZERO Result(00617) and with other request(00956,00714,00601) it returns response
Is Really Multiple country component filter is available in Geocode API ?
what is actual behaviour of Geocode on component filtering ?
If any improvement need to above request to get accurate Multiple country component filter result do let us know too
ee...@google.com <ee...@google.com>
ee...@google.com <ee...@google.com> #3
Thank you for posting!
Upon checking your given Geocoding API web request, please do avoid repeating the country
component filter as per our
- Do not repeat these component filters in requests, or the API will return Invalid_request: country, postal_code, route
- If the request contains repeated component filters, the API evaluates those filters as an AND, not an OR.
This Geocoding API web request has component filter country:US
, but the postal code 00617
is not existing in the US, that’s why it’s returning ZERO_RESULTS
.
That said, you can use the country:PR
only if you want to see the results from Puerto Rico.
ad...@gmail.com <ad...@gmail.com> #4
-> This Geocoding API web request has component filter country:US, but the postal code 00617 is not existing in the US, that’s why it’s returning ZERO_RESULTS.
In same case 00956,00714,00601 zipcode belongs to country PR , not US
But it fetches the result and resturn the valid response.even with (postal_code:00956|country:US|country:PR)
This where we see a contradiction between different operations with same scenario.(i.e 00617 it not works but for 00956,00714,00601 it fetch the result)even with repeating the country component filter
mi...@google.com <mi...@google.com> #5
Thanks for the post!
As mentioned in
You can use Places Autocomplete that allows to restrict requests to multiple countries. For more information, please check the documentation here:
https://developers.google.com/maps/documentation/places/web-service/autocomplete#components https://developers.google.com/maps/documentation/javascript/places-autocomplete#add-autocomplete
That said, we will mark this issue as a duplicate of
Description
Description has been deleted.