mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapImageLayer.cs
This commit is contained in:
parent
47a96b22cc
commit
62b1bb24d7
|
|
@ -141,15 +141,9 @@ namespace MapControl
|
||||||
|
|
||||||
protected override void SetParentMap(MapBase map)
|
protected override void SetParentMap(MapBase map)
|
||||||
{
|
{
|
||||||
if (map == null)
|
if (map != null)
|
||||||
{
|
{
|
||||||
updateTimer.Stop();
|
while (Children.Count < 2)
|
||||||
ClearImages();
|
|
||||||
Children.Clear();
|
|
||||||
}
|
|
||||||
else if (Children.Count == 0)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 2; i++)
|
|
||||||
{
|
{
|
||||||
Children.Add(new Image
|
Children.Add(new Image
|
||||||
{
|
{
|
||||||
|
|
@ -159,6 +153,12 @@ namespace MapControl
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
updateTimer.Stop();
|
||||||
|
ClearImages();
|
||||||
|
Children.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
base.SetParentMap(map);
|
base.SetParentMap(map);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue