diff --git a/YJMPD-UWP/Model/GameHandler.cs b/YJMPD-UWP/Model/GameHandler.cs index aa7265e..2125594 100644 --- a/YJMPD-UWP/Model/GameHandler.cs +++ b/YJMPD-UWP/Model/GameHandler.cs @@ -33,6 +33,7 @@ namespace YJMPD_UWP.Model public GameStatus Status { get; private set; } public List Players { get; private set; } + public BasicGeoposition Destination { get; private set; } public bool Selected { get; private set; } @@ -73,6 +74,7 @@ namespace YJMPD_UWP.Model Players = new List(); Status = GameStatus.STOPPED; Selected = false; + Destination = new BasicGeoposition() { Altitude = -1 }; App.Photo.OnStatusUpdate += Photo_OnStatusUpdate; GeofenceMonitor.Current.GeofenceStateChanged += Current_GeofenceStateChanged; } @@ -149,6 +151,8 @@ namespace YJMPD_UWP.Model { App.Navigate(typeof(MatchView)); + Destination = bgps; + GeofenceMonitor.Current.Geofences.Add(new Geofence("destination", new Geocircle(bgps, 50), MonitoredGeofenceStates.Entered | MonitoredGeofenceStates.Exited, false, TimeSpan.FromSeconds(1))); UpdateGameStatus(GameStatus.STARTED); @@ -171,6 +175,7 @@ namespace YJMPD_UWP.Model { App.Photo.Reset(); Selected = false; + Destination = new BasicGeoposition() { Altitude = -1 }; Players.Clear(); GeofenceMonitor.Current.Geofences.Clear(); UpdateGamePlayers(null); diff --git a/YJMPD-UWP/Model/GeoHandler.cs b/YJMPD-UWP/Model/GeoHandler.cs index cfa622a..e9a9064 100644 --- a/YJMPD-UWP/Model/GeoHandler.cs +++ b/YJMPD-UWP/Model/GeoHandler.cs @@ -85,8 +85,8 @@ namespace YJMPD_UWP.Model geo = new Geolocator { DesiredAccuracy = PositionAccuracy.High, - MovementThreshold = 3 - //ReportInterval = 1500 + //MovementThreshold = 3 + ReportInterval = 1500 }; ClearHistory(); @@ -131,8 +131,7 @@ namespace YJMPD_UWP.Model private void Geo_PositionChanged(Geolocator sender, PositionChangedEventArgs args) { - - UpdatePosition(args.Position); + UpdatePosition(args.Position); if(trackhistory) _history.Add(args.Position); diff --git a/YJMPD-UWP/Model/PhotoHandler.cs b/YJMPD-UWP/Model/PhotoHandler.cs index 90083e4..b028e93 100644 --- a/YJMPD-UWP/Model/PhotoHandler.cs +++ b/YJMPD-UWP/Model/PhotoHandler.cs @@ -25,12 +25,13 @@ namespace YJMPD_UWP.Model public PhotoHandler() { + Photo = "ms-appx:///Assets/Error.png"; Status = PhotoStatus.NOPHOTO; } public void Reset() { - Photo = null; + Photo = "ms-appx:///Assets/Error.png"; Status = PhotoStatus.NOPHOTO; }