hello,
I am using this solution this takes one values from dropdown and show the specific country
how to pass multiple country, like USA, India and PK
please advice
Hi nauna,
You can now restrict Autocomplete predictions to only surface from multiple countries. You can do this by specifying up to 5 countries in the componentRestrictions field of the AutocompleteOptions.
You have use an array of Countries for componentRestrictions.
var options = { types: ['(cities)'], componentRestrictions: { country: ["USA","India"]} };
For more details refer below link.
https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#ComponentRestrictions.country
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.