mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Simplified polyline implementations
This commit is contained in:
parent
641b4354a0
commit
b114243e61
4 changed files with 59 additions and 51 deletions
|
|
@ -3,7 +3,6 @@
|
|||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if WINUI
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
|
|
@ -55,15 +54,7 @@ namespace MapControl
|
|||
|
||||
protected override void UpdateData()
|
||||
{
|
||||
var pathFigures = ((PathGeometry)Data).Figures;
|
||||
pathFigures.Clear();
|
||||
|
||||
if (ParentMap != null && Locations != null)
|
||||
{
|
||||
var longitudeOffset = GetLongitudeOffset(Location ?? Locations.FirstOrDefault());
|
||||
|
||||
AddPolylineLocations(pathFigures, Locations, longitudeOffset, true);
|
||||
}
|
||||
((PathGeometry)Data).Figures = GetPolylineFigures(Locations, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue