📌  相关文章
📜  谷歌地方自动完成只是城市 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:49.359000             🧑  作者: Mango

代码示例1
function initialize() {

 var options = {
  types: ['(cities)'],
  componentRestrictions: {country: "us"}
 };

 var input = document.getElementById('searchTextField');
 var autocomplete = new google.maps.places.Autocomplete(input, options);
}