s id=这里是位置输入框id
s id1=这里是文本显示结果id
ug(id,"text",geo)
s geoapi="http://gc.ditu.aliyun.com/geocoding?a="
f(geo!="")
{
sr(geo," ","",geo)
sr(geo,"n","",geo)
t()
{
stobm(geo,"utf-8",geo)
ss(geoapi+geo,geogo)
hs(geogo,null,null,geoback)
f(geoback!="null")
{
syso(geoback)
s dh=","l"
s dkh="}"
sj(geoback,"{"lon":",dh,lon)
sj(geoback,""lat":",dkh,lat)
ss("经度:"+lon+"n纬度:"+lat,jwd)
syso(lon)
syso(lat)
us(id1,"text",jwd)
}
else
{
tw("网络不给力啊!")
}
}
}