The Google Places API is a service that returns places predictions using HTTP requests.
The service can be used to provide an autocomplete functio...
For further actions, you may consider blocking this person and/or reporting abuse
Hi,
Great article, loved it!
I'm trying to limit the suggestions and the selection to a certain country, and I encounter a problem where some addresses in a certain country are returned with Country: NULL, and then they're not selectable.
I'm guessing this is related to places that are under some dispute..
If I add NULL as a "Country", how can I know to which places did I just opened up to? Is there a list or a map showing places with a country:NULL?
Thanks!
Hi @nicky_zintchenko_d012b3b7
Whether you're implementing Autocomplete Widget or AutocompleteService, you can use the
componentRestrictionsparameter to filter results to show only those places within a specified country.For the Autocomplete Widget, set the restriction like this:
and for the AutocompleteService:
Do you have an example of an address which returns a
country: nullattribute?If you really need to get the Country from a known LatLng, you are also able to geocode the suggestion.
Hope this help.
Hey friend! Rajdip here. Could you confirm for me if the "places autocomplete API" is free to use or is a billed service? I am from India.
Hello Rajdip, It depends on your usage. You will have to enable the billing for your account but, for each Google Maps Platform account, a $200 USD credit is available each month. More details here: developers.google.com/maps/documen...