limit Google maps of countries in the autocomplete list to "INDIA, USA and UK"
- by Manoj Thakur
This code is not working. Please tell me the exact solution
<script src="maps.googleapis.com/maps/api/…; type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
var input = document.getElementById('searchTextField');
/* restrict to multiple cities? */
var options = {
types: ['(cities)'],
componentRestrictions: {country: ["usa", "uk"]}
};
var autocomplete = new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>