2017-08-19 4 views
-1

Je reçois l'erreur suivante lorsque j'essaie d'exécuter ce code dans mon application UWP. Je pris le code de l'échantillon officiel:Erreur "InvalidCredentials" dans le code géographique inverse UWP API

erreur « de InvalidCredentials » dans UWP inverse geo API de code

BasicGeoposition location = new BasicGeoposition(); 
location.Latitude = 47.643; 
location.Longitude = -122.131; 
Geopoint pointToReverseGeocode = new Geopoint(location); 

// Reverse geocode the specified geographic location. 
MapLocationFinderResult result = await MapLocationFinder.FindLocationsAtAsync(pointToReverseGeocode); 

// If the query returns results, display the name of the town 
// contained in the address of the first result. 
if (result.Status == MapLocationFinderStatus.Success) 
{ 
    tbOutputText.Text = "town = " + result.Locations[0].Address.Town; 
} 

Répondre