Bugfixes
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Devices.Geolocation;
|
||||
using Windows.Devices.Geolocation.Geofencing;
|
||||
using Windows.System;
|
||||
|
||||
namespace NavCityBreda.Model
|
||||
@@ -87,6 +88,8 @@ namespace NavCityBreda.Model
|
||||
geo.PositionChanged += Geo_PositionChanged;
|
||||
geo.StatusChanged += Geo_StatusChanged;
|
||||
|
||||
GeofenceMonitor.Current.Geofences.Clear();
|
||||
|
||||
_position = await geo.GetGeopositionAsync();
|
||||
|
||||
return "Connected";
|
||||
|
||||
@@ -122,7 +122,9 @@ namespace NavCityBreda.Views
|
||||
ZoomRoute();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveRoute();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -155,11 +157,14 @@ namespace NavCityBreda.Views
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveRoute()
|
||||
private async void RemoveRoute()
|
||||
{
|
||||
Track(false);
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(100));
|
||||
Map.MapElements.Clear();
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(100));
|
||||
GeofenceMonitor.Current.Geofences.Clear();
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(100));
|
||||
DrawCurrenPosition(App.Geo.Position.Coordinate.Point);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user