mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update GroundOverlay.cs
This commit is contained in:
parent
af3a45064d
commit
f948f07f7e
|
|
@ -83,23 +83,18 @@ namespace MapControl
|
||||||
|
|
||||||
if (imageOverlays != null)
|
if (imageOverlays != null)
|
||||||
{
|
{
|
||||||
AddImageOverlays(imageOverlays);
|
foreach (var imageOverlay in imageOverlays.Where(i => i.ImageSource != null))
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddImageOverlays(IEnumerable<ImageOverlay> imageOverlays)
|
|
||||||
{
|
|
||||||
foreach (var imageOverlay in imageOverlays.Where(i => i.ImageSource != null))
|
|
||||||
{
|
|
||||||
var image = new Image
|
|
||||||
{
|
{
|
||||||
Source = imageOverlay.ImageSource,
|
var image = new Image
|
||||||
Stretch = Stretch.Fill
|
{
|
||||||
};
|
Source = imageOverlay.ImageSource,
|
||||||
|
Stretch = Stretch.Fill
|
||||||
|
};
|
||||||
|
|
||||||
image.SetValue(Canvas.ZIndexProperty, imageOverlay.ZIndex);
|
image.SetValue(Canvas.ZIndexProperty, imageOverlay.ZIndex);
|
||||||
SetBoundingBox(image, imageOverlay.BoundingBox);
|
SetBoundingBox(image, imageOverlay.BoundingBox);
|
||||||
Children.Add(image);
|
Children.Add(image);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue