diff --git a/Trippit/Package.appxmanifest b/Trippit/Package.appxmanifest index ef57337..8973ca5 100644 --- a/Trippit/Package.appxmanifest +++ b/Trippit/Package.appxmanifest @@ -1,6 +1,6 @@  - + ms-resource:Trippit.Localization/AppResources/AppName diff --git a/Trippit/ViewModels/TripResultViewModel.cs b/Trippit/ViewModels/TripResultViewModel.cs index 4050aee..632b425 100644 --- a/Trippit/ViewModels/TripResultViewModel.cs +++ b/Trippit/ViewModels/TripResultViewModel.cs @@ -17,6 +17,7 @@ using Trippit.Services; using Trippit.Services.SettingsServices; using Trippit.Styles; +using Windows.Devices.Geolocation; using Windows.Storage; using Windows.UI.Xaml.Navigation; @@ -166,6 +167,19 @@ private void ShowTripDetails(TripItinerary model) } }) .ToList(); + + // Add one extra point at the beginning if this is a walk leg to account for legs starting too far away + if (leg.Mode == ApiEnums.ApiMode.Walk && legIndex > 0) + { + BasicGeoposition? previousLegLastPoint = ColoredMapLines.LastOrDefault()?.LastOrDefault()?.Coordinates; + if (previousLegLastPoint != null) + { + coloredPoints.Insert(0, new ColoredMapLinePoint(previousLegLastPoint.Value, HslColors.GetModeColor(ApiEnums.ApiMode.Walk), true)); + } + } + + // Add one extra point at the end to account for legs ending too early + coloredPoints.Add(new ColoredMapLinePoint(leg.EndCoords, HslColors.GetModeColor(leg.Mode), leg.Mode == ApiEnums.ApiMode.Walk)); var mapLine = new ColoredMapLine(coloredPoints, legIds[legIndex]); ColoredMapLines.Add(mapLine); legIndex++;