mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Use StreamGeometry in WPF MapPolypoint
This commit is contained in:
parent
84890090f8
commit
acdfc1861f
4 changed files with 27 additions and 33 deletions
|
|
@ -58,7 +58,8 @@ namespace MapControl
|
|||
|
||||
protected void UpdateData(IEnumerable<Location> locations, bool closed)
|
||||
{
|
||||
var pathFigures = new PathFigureCollection();
|
||||
var pathFigures = ((PathGeometry)Data).Figures;
|
||||
pathFigures.Clear();
|
||||
|
||||
if (ParentMap != null && locations != null)
|
||||
{
|
||||
|
|
@ -66,11 +67,9 @@ namespace MapControl
|
|||
|
||||
AddPolylinePoints(pathFigures, locations, longitudeOffset, closed);
|
||||
}
|
||||
|
||||
((PathGeometry)Data).Figures = pathFigures;
|
||||
}
|
||||
|
||||
protected void AddPolylinePoints(PathFigureCollection pathFigures, IEnumerable<Location> locations, double longitudeOffset, bool closed)
|
||||
private void AddPolylinePoints(PathFigureCollection pathFigures, IEnumerable<Location> locations, double longitudeOffset, bool closed)
|
||||
{
|
||||
if (locations.Count() >= 2)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue