我正在使用Google Maps API V3。以下是我要设置的自动完成代码:
var options = {
componentRestrictions: {country: elmts.rs_country.val()}
};
new google.maps.places.Autocomplete(start_address, options);
Run Code Online (Sandbox Code Playgroud)
这样很好。但是,我需要动态更改国家/地区限制。
如何将“ componentRestrictions”更改为另一个国家?
| 归档时间: |
|
| 查看次数: |
1549 次 |
| 最近记录: |