This commit is contained in:
2016-01-07 11:02:00 +01:00
parent 6643c71824
commit ac63d0a0d7
2 changed files with 9 additions and 1 deletions
+3
View File
@@ -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";
+6 -1
View File
@@ -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);
}