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