private void ProcessPosition(GeoPosition<GeoCoordinate> position)
{
if (position == null || position.Location == null || position.Location.IsUnknown)
{
return;
}
// Stores the new valid position.
DeviceLocation = position.Location;
// Uses the location's course if the compass is not enabled.
if (!Compass.IsSupported)
{
DeviceHeading = position.Location.Course;
}
}