如何使谷歌自动完成只建议有邮政编码和门牌号码的地方?我希望能够只选择带有邮政编码的房子。
我尝试过的:
const autocompleteConfig = {
componentRestrictions: { country: {{country}} },
types: ['address'],
};
const autocomplete = new google.maps.places.Autocomplete({{element}}, autocompleteConfig);
我得到的结果的问题 - 一些建议没有邮政编码或门牌号码。