Incase you want to obtain address for a particular longitude and lattitude make use of MapFinder class to obtain address without the need to use BingMaps Api.
First enable location in the package manifest to access location in your app.
Now get the longitude and lattitude using the following code:
- Geolocator locator = new Windows.Devices.Geolocation.Geolocator();
- locator.DesiredAccuracyInMeters = 50;
- var position = await locator.GetGeopositionAsync();
Position will have civic address and coordinate which will have lat and long inside it.
Now to obtain the address use the following code
- MapLocationFinderResult result = await MapLocationFinder.FindLocationsAtAsync(position .Coordinate.Point);
The above code helps to fetch the address from the point provided. Now you can use the result to extract the address.
- string country = result.Locations[0].Address.Country;
- string state = result.Locations[0].Address.Region;
- string area = result.Locations[0].Address.Town;
- string district = result.Locations[0].Address.District;
- string street = result.Locations[0].Address.Street;
Hope this helps.