I am working with Google Maps API V3. The following is my code to set-up for autocomplete:
var options = {
componentRestrictions: {country: elmts.rs_country.val()}
};
new google.maps.places.Autocomplete(start_address, options);
This works just fine. However, I need to dynamically change the country restriction.
How can I change the 'componentRestrictions' to another country?
Please see this Google maps api. You can use the method setComponentRestrictions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With