.
YQL Geo Library 是一个 JavaScript 库用来根据地名获取经纬度,或者根据经纬度获取对应的地名等……
IP解析,得到当前IP地址的信息:
yqlgeo.get('192.168.86.240',function(o){
alert(o.place.name + ',' + o.place.country.content +
' (' + o.place.centroid.latitude + ',' +
o.place.centroid.longitude + ')'
);
});
yqlgeo.get('192.168.86.240',function(o){
alert(o.place.name + ',' + o.place.country.content +
' (' + o.place.centroid.latitude + ',' +
o.place.centroid.longitude + ')'
);
});
用户
yqlgeo.get('visitor',function(o){
alert(o.place.name + ',' + o.place.country.content +
' (' + o.place.centroid.latitude + ',' +
o.place.centroid.longitude + ')'
);
});
yqlgeo.get('visitor',function(o){
alert(o.place.name + ',' + o.place.country.content +
' (' + o.place.centroid.latitude + ',' +
o.place.centroid.longitude + ')'
);
});
详情:http://isithackday.com/hacks/geo/yql-geo-library/