Ugly bugfix

This commit is contained in:
2016-01-07 11:56:00 +01:00
parent 3433d6e038
commit 7e1e4432a0
2 changed files with 18 additions and 8 deletions
+12 -7
View File
@@ -134,9 +134,12 @@ namespace NavCityBreda.Views
if (App.RouteManager.CurrentRoute == null) return;
GeofenceMonitor.Current.Geofences.Clear();
Map.MapElements.Clear();
await Task.Delay(TimeSpan.FromMilliseconds(100));
while (Map.MapElements.Any() || GeofenceMonitor.Current.Geofences.Any())
{
Map.MapElements.Clear();
await Task.Delay(TimeSpan.FromMilliseconds(100));
GeofenceMonitor.Current.Geofences.Clear();
}
Map.MapElements.Add(CurrentPosition);
Map.MapElements.Add(CurrentNavigationLine);
@@ -158,10 +161,12 @@ namespace NavCityBreda.Views
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();
while (Map.MapElements.Any() || GeofenceMonitor.Current.Geofences.Any())
{
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);
}
+6 -1
View File
@@ -2,6 +2,7 @@
using NavCityBreda.Model.Object;
using NavCityBreda.ViewModels;
using System;
using System.Linq;
using System.Threading.Tasks;
using Windows.UI;
using Windows.UI.Xaml;
@@ -49,7 +50,11 @@ namespace NavCityBreda.Views
private async void DrawRoute()
{
Map.MapElements.Clear();
while (Map.MapElements.Any())
{
Map.MapElements.Clear();
await Task.Delay(TimeSpan.FromMilliseconds(100));
}
Zoom();