Google GeoCode Autocomplete limit State
问题 I am trying to add an Google Geocode Autocomplete field to my form. I have been able to get it to restrict the results returned to the country (AU) but it would be even better if I could limit the results to the state as well. (New South Wales/NSW) This is my current initialize() function: function initialize() { var options = { types: ['geocode'], componentRestrictions: {country:"AU"} }; autocomplete = new google.maps.places.Autocomplete( (document.getElementById('autocomplete')),options);