MapViewModel class contains a
GetLocation method that uses the
Geolocator class, which is new to Windows Phone 8, to retrieve the phone’s current location (see Listing 18.1).
GetPositionAsync method is an awaitable method that allows you to retrieve the phone’s last known location without blocking the UI thread.
When attempting to call the
GetGeopositionAsync method, if location is disabled in the phone’s settings, an
UnauthorizedAccessException is raised.
async Task ...