我目前开始使用 Google Maps v3 API,我想知道是否可以使用自动完成功能来仅自动完成街道地址名称?
我目前正在使用此代码:
$(document).ready(function(){
var options = {
types: ['(cities)'],
componentRestrictions: {country: "ar" }
};
var input = document.getElementById('laboral_calle');
var autocomplete = new google.maps.places.Autocomplete(input, options);
});
但目前不工作。
我需要设置一个固定的州和一个固定的城市,以便在文本字段中只显示街道名称建议。
可能吗?