Visual studio 2010 Bing Map location finder by longitude and latitude

六月ゝ 毕业季﹏ 提交于 2019-12-11 00:51:17

问题


I am creating a windows 7 phone application which able to search for location by name of location. Now my problem is that i can't locate the current location and the bing map is unable to search for the location.

I am using visual studio 2010 c sharp coding.


回答1:


You can use the Bing Locations API to retrieve the latitude and longitude of a location specified by name. There is a REST API that can provide responses in JSON or XML and there is also a SOAP API (just navigate through the docs to find the SOAP API reference). For example, this request does a lookup for location information by street in the US:

http://dev.virtualearth.net/REST/v1/Locations/US/WA/98052/Redmond/1 Microsoft Way?o=xml&key=BingMapsKey

To start working with the Bing Maps REST Services, you must have a Bing Maps Key. To get a Bing Maps Key, take a look at this article.




回答2:


Or check this article describing the use of the Resco Location Library. (Self promoting, sorry.) GeoCode class should help.



来源:https://stackoverflow.com/questions/5698014/visual-studio-2010-bing-map-location-finder-by-longitude-and-latitude

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!