mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Reworked MapPath and derived classes
This commit is contained in:
parent
414389513e
commit
49d508b3f5
9 changed files with 106 additions and 84 deletions
|
|
@ -3,6 +3,7 @@
|
|||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if WINDOWS_UWP
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
|
@ -42,12 +43,14 @@ namespace MapControl
|
|||
|
||||
protected override void UpdateData()
|
||||
{
|
||||
var figures = ((PathGeometry)Data).Figures;
|
||||
figures.Clear();
|
||||
var pathFigures = ((PathGeometry)Data).Figures;
|
||||
pathFigures.Clear();
|
||||
|
||||
if (ParentMap != null)
|
||||
if (ParentMap != null && Locations != null)
|
||||
{
|
||||
AddPolylineLocations(figures, Locations, true);
|
||||
var longitudeOffset = GetLongitudeOffset(Location ?? Locations.FirstOrDefault());
|
||||
|
||||
AddPolylineLocations(pathFigures, Locations, longitudeOffset, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue