mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 15:05:50 +00:00
Version 4.2.0
This commit is contained in:
parent
9f8ef8acb0
commit
fd02476c6b
17 changed files with 174 additions and 141 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue