【发布时间】:2020-01-27 14:32:44
【问题描述】:
我在尝试使用 Google 地图中的 Geocoder Api 设置新地图中心时遇到此错误。
geocoder.geocode({adress:this.startPosition},
(results2,status)=>{
if(status=="OK"){
this.map.setCenter(results2[0].geometry.location)
alert(results2[0].geometry.location)
}else{
alert("Geocode was not sucessfull" + status)
}
});
其中“startPosition”是我所在位置的字符串
【问题讨论】:
-
应该是
address? -
是的。谢谢。