I am a WP7 developer. I have longitude and latitude of a location. Is there anyway to get the info the location defined by the coordinate ie longitude and latitude. Thank yo
You can make use of a web service provided by Microsoft that returns the city, state and country based on the latitude and longitude you provide.
Create a web service reference in your project by providing the link http://msrmaps.com/TerraService2.asmx
I have named the service as myTerraService
myTerraService.TerraServiceSoapClient client = new myTerraService.TerraServiceSoapClient();
client.ConvertLonLatPtToNearestPlaceCompleted += new EventHandler(client_ConvertLonLatPtToNearestPlaceCompleted);
client.ConvertLonLatPtToNearestPlaceAsync(new myTerraService.LonLatPt { Lat = latitude, Lon = longitude });
}
void client_ConvertLonLatPtToNearestPlaceCompleted(object sender, myTerraService.ConvertLonLatPtToNearestPlaceCompletedEventArgs e)
{
string location = e.Result; // this string will have city, state, country
}