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