///
/// Get Location name by lat and long
///
private async void getLocationName()
{
Geoposition geoposition = await getLocation(1);
List locations;
ReverseGeocodeQuery query = new ReverseGeocodeQuery();
query.GeoCoordinate = new GeoCoordinate(geoposition.Coordinate.Latitude, geoposition.Coordinate.Longitude);
query.QueryCompleted += (s, e) =>
{
if (e.Error == null && e.Result.Count > 0)
{
locations = e.Result as List;
Model.LocationName = locations[0].Information.Address.Street;
// Do whatever you want with returned locations.
// e.g. MapAddress address = locations[0].Information.Address;
}
};
query.QueryAsync();
}