2
directionsService.route (request,
function (result, status)
{
alert(status);
if (status == google.maps.DirectionsStatus.OK)
{
directionsDisplay.setDirections (result);
pointsArray = result.routes[0].overview_path;
的問題是,所述* result.routes [0] .overview_path; *返回'google.maps.LatLng'類型的陣列。即每個元素都是該數組中類「google.maps.LatLng」的「對象」。如何從類「google.maps.LatLng」的對象中提取緯度和經度值?
我想將所有返回的緯度和經度寫在文本文件上。
如何從類的對象提取的個人「的緯度和經度」值「google.maps.LatLng」
我需要同樣的事情,正是做到了。謝謝。 – genkilabs 2012-03-02 20:27:12