当时获取的结果如下图所示,但是可能由于有道已经删除该url网址,现在已经不能通过该接口获取地理位置.所有我又提供了一种新的方法,希望能帮助到大家和那位朋友.
源代码及显示的结果如下所示:
下面提供一些这方面的有些非常优秀的内容仅供大家学习,同时也方便自己下次查阅:
1.c# 网络编程之获取本机名\ip地址\域名\物理位置 (这是我自己的文章,结合该篇文章学习)
<a target="_blank" href="http://blog.csdn.net/eastmount/article/details/9270221">http://blog.csdn.net/eastmount/article/details/9270221</a>
2.get user location by ip address(使用c#获取物理位置 也是该篇文章的基础)
<a target="_blank" href="http://www.codeproject.com/questions/686644/get-user-location-by-ip-address">http://www.codeproject.com/questions/686644/get-user-location-by-ip-address</a>
3.获取电脑物理地址以及通过ip地址获取当前地理位置的接口-抢街饭的专栏(使用php获取非常优秀的文章)
<a target="_blank" href="http://blog.csdn.net/lzwjavaphp/article/details/6972667">http://blog.csdn.net/lzwjavaphp/article/details/6972667</a>
4.ip address location in asp.net(consume a free online api and fetch data using linq to xml)
<a target="_blank" href="http://www.dotnetcurry.com/showarticle.aspx?id=325">http://www.dotnetcurry.com/showarticle.aspx?id=325</a>
5.get uesr location by ip address(关于它的讨论 希望大家去stack overflow学习知识)
<a target="_blank" href="http://stackoverflow.com/questions/4327629/get-user-location-by-ip-address">http://stackoverflow.com/questions/4327629/get-user-location-by-ip-address</a>
6.xmldocument.load(url)问题(读取天气信息文章,与我的方法相同)
<a target="_blank" href="http://www.cnblogs.com/sharpfeng/archive/2011/03/02/1968666.html">http://www.cnblogs.com/sharpfeng/archive/2011/03/02/1968666.html</a>
最后希望该篇文章对大家有所帮助,同时希望该文章能帮助那位同学解决问题.如果文章中错误或不足之处,见谅!由于只会采用这种通过第三方接口的方法获取物理位置,很大程度依赖与第三方的数据,如果该网址被废除,很麻烦,同时会遇到不同网址查询结果也不同.希望有好的方法可以讨论分享.