mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapItemsImageLayer.WPF.cs
This commit is contained in:
parent
f23b9c6801
commit
f1c1508e97
|
|
@ -51,11 +51,11 @@ namespace MapControl
|
|||
|
||||
foreach (var item in items)
|
||||
{
|
||||
var positions = item.Locations.Select(l => projection.LocationToMap(l)).ToArray();
|
||||
var positions = item.Locations.Select(l => projection.LocationToMap(l)).ToList();
|
||||
|
||||
if (positions.Any(p => mapRect.Contains(p)))
|
||||
{
|
||||
for (int i = 0; i < positions.Length; i++)
|
||||
for (int i = 0; i < positions.Count; i++)
|
||||
{
|
||||
positions[i] = new Point(
|
||||
scale * (positions[i].X - mapRect.X),
|
||||
|
|
@ -66,8 +66,9 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
var drawingBrush = new DrawingBrush(drawings)
|
||||
var drawingBrush = new DrawingBrush
|
||||
{
|
||||
Drawing = drawings,
|
||||
ViewboxUnits = BrushMappingMode.Absolute,
|
||||
Viewbox = new Rect(0, 0, scale * mapRect.Width, scale * mapRect.Height),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue