[問題] google map api

看板Web_Design作者 (風)時間13年前 (2012/09/20 23:19), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串2/2 (看更多)
我要從資料庫撈出很多地址。 然後要以一個地址為中心, 顯示出距離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
google map api 反查有每日上限
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
文章代碼(AID): #1GMpG43s (Web_Design)
文章代碼(AID): #1GMpG43s (Web_Design)