问题
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