如何在Windows Phone 8中使用纬度和经度获取位置

Kan*_*pan 1 c# windows-phone-8

如何在c#.Please帮助中使用纬度和经度获取位置地址

pra*_*n S 7

试试这段代码,我希望这会对你有所帮助.

 WebClient client = new WebClient();
        string strLatitude = " 13.00";
        string strLongitude = "80.25";
        client.DownloadStringCompleted += client_DownloadStringCompleted;
        string Url = "http://maps.googleapis.com/maps/api/geocode/json?latlng=" + strLatitude + "," + strLongitude + "&sensor=true";
        client.DownloadStringAsync(new Uri(Url, UriKind.RelativeOrAbsolute));
        Console.Read();

static void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
 {
    var getResult = e.Result;
        JObject parseJson = JObject.Parse(getResult);
        var getJsonres = parseJson["results"][0];
        var getJson = getJsonres["address_components"][1];
        var getAddress = getJson["long_name"];
        string Address = getAddress.ToString();
Run Code Online (Sandbox Code Playgroud)

}