mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Version 4.4.1: MapPolygon for UWP in progress
This commit is contained in:
parent
6b024e2195
commit
946713b8eb
5 changed files with 8 additions and 14 deletions
|
|
@ -32,7 +32,7 @@ namespace MapControl
|
|||
var figures = ((PathGeometry)Data).Figures;
|
||||
figures.Clear();
|
||||
|
||||
if (ParentMap != null && Locations != null)
|
||||
if (ParentMap != null && Locations != null && Locations.Count() >= 2)
|
||||
{
|
||||
var locations = Locations;
|
||||
var offset = GetLongitudeOffset();
|
||||
|
|
@ -43,12 +43,9 @@ namespace MapControl
|
|||
}
|
||||
|
||||
var points = locations.Select(loc => ParentMap.MapProjection.LocationToViewportPoint(loc)).ToList();
|
||||
points.Add(points[0]);
|
||||
|
||||
if (points.Count >= 2)
|
||||
{
|
||||
points.Add(points[0]);
|
||||
CreatePolylineFigures(points);
|
||||
}
|
||||
CreatePolylineFigures(points);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace MapControl
|
|||
{
|
||||
((PathGeometry)Data).Figures.Clear();
|
||||
|
||||
if (ParentMap != null && Locations != null)
|
||||
if (ParentMap != null && Locations != null && Locations.Count() >= 2)
|
||||
{
|
||||
var locations = Locations;
|
||||
var offset = GetLongitudeOffset();
|
||||
|
|
@ -43,10 +43,7 @@ namespace MapControl
|
|||
|
||||
var points = locations.Select(loc => ParentMap.MapProjection.LocationToViewportPoint(loc)).ToList();
|
||||
|
||||
if (points.Count >= 2)
|
||||
{
|
||||
CreatePolylineFigures(points);
|
||||
}
|
||||
CreatePolylineFigures(points);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue