[問題] google map api
我要從資料庫撈出很多地址。
然後要以一個地址為中心,
顯示出距離100公里以內的其他地址。
所以要算距離,
要算距離,就要得到經度、緯度。
所以試著這樣寫,目的是要回傳經度、緯度。
function GetAddress( address )
{
geocoder.geocode( { 'address': address}, function( results, status )
{
if ( status == google.maps.GeocoderStatus.OK )
return results[0].geometry.location ;
else
alert( status ) ;
}
);
}
但這樣回傳回來的經度緯度,
我用alert顯示出來,都是 undefined。
請問要如何解決?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.204.149.127
推
09/21 00:09, , 1F
09/21 00:09, 1F
→
09/21 00:12, , 2F
09/21 00:12, 2F
→
09/21 23:05, , 3F
09/21 23:05, 3F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):