0
我想反向地理编码,我有三个坐标,我想将它们转换为地址,我已经使用了以下方法。我在执行反向地理编码时做错了什么
var point1 = new google.maps.LatLng(latLng1);
var point2 = new google.maps.LatLng(latLng2);
var point3 = new google.maps.LatLng(latLng3);
where latLng1, latLng2, latLng3 are coordinates.
and then further I want to use these addresses to following code to create a path
var request = {
origin:location1,
destination:location2,
waypoints:[{location: point1}, {location: point2}, {location: point3}],
travelMode: google.maps.DirectionsTravelMode.WALKING
};
但它从不显示任何东西。
我是否正确,在google APIv3中我们可以使用地址字符串或latlng中的一个字符。我们如何在航点使用latlag。
您输入坐标以获取地址,然后将地址输入探路者,当探路者未输出时,您确定地址未正确提供?你有没有尝试*测试*给出的地址? – bdares
@bdares其实我不知道如何给google提供的这个waypoint功能,我知道我们也可以给waypoint功能地址。例如' – Sara
例如航点:[{location:london},{location:sussex},{location:manchester}],但我只是不确定lat和lng如何在航点提供。 – Sara