Version 4.2.0

This commit is contained in:
ClemensF 2017-10-08 17:35:07 +02:00
parent 9f8ef8acb0
commit fd02476c6b
17 changed files with 174 additions and 141 deletions

View file

@ -271,29 +271,25 @@ namespace MapControl
}
}
var imageUpdated = false;
ImageSource imageSource = null;
try
{
imageUpdated = UpdateImage(boundingBox);
imageSource = GetImage(boundingBox);
}
catch (Exception ex)
{
Debug.WriteLine("MapImageLayer: " + ex.Message);
}
if (!imageUpdated)
{
UpdateImage((BitmapSource)null);
}
UpdateImage(imageSource);
}
}
/// <summary>
/// Creates an image request Uri or a BitmapSource for the specified image bounding box.
/// Must either call UpdateImage(Uri) or UpdateImage(BitmapSource) or return false on failure.
/// Returns an ImageSource for the specified bounding box.
/// </summary>
protected abstract bool UpdateImage(BoundingBox boundingBox);
protected abstract ImageSource GetImage(BoundingBox boundingBox);
private void SetTopImage(ImageSource imageSource)
{