English 中文(简体)
从用户地址[封闭式]获得用户纬度和长度的最简单途径
原标题:What s the simplest way to get a user s latitude and longitude from an ip address [closed]
  • 时间:2009-10-16 06:26:29
  •  标签:

我总是需要用户在我所从事的大多数网络项目中的位置。 I ve used Maxmind s GeoIp,但涉及进口数据集,需要不断更新。 还有其他一些免费和有偿服务,但我只想简单一些,在第二点的某个地方可以补充。

因此,这是一场灾难,因为我有一个简单的解决办法,详见下文,但我希望看到,任何其他人是否使用这种技术,是否有更好的解决办法,或者是否有一些意外的陷阱。

最佳回答
问题回答

I ve 使用了wipmania。 免费的初专干事服务,我并不真正相信其准确性,而是真正简单的使用:

// an example using jQuery
$.getJSON( http://api.wipmania.com/jsonp?callback=? , function (data) { 
  alert( Latitude:   + data.latitude + 
         
Longitude:   + data.longitude + 
         
Country:   + data.address.country); 
});

查阅





相关问题
热门标签