作者jami520 (我的生命因你而發光)
看板Google
標題[問題] (緯度,經度)怎樣可以個別存成一個變數呢?
時間Sat Aug 30 08:44:44 2008
function showAddress(address,dec)
{
if (geocoder)
{
geocoder.getLatLng(
address,
function(point)
{
if (!point)
{
alert(address + " not found");
}
else
{
alert(point) //顯示(25,31)
}
}
}
}
point會是(25,31),好像有包含括號
不知道有辦法各別取其緯度和經度存成變數嗎?
例如:
Lat=25
Lng=31
不知道這樣該怎樣寫呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.193.176.104
1F:→ KC73:lat = point.lat(); lng = point.lng(); 08/30 09:15