Reverted image download cancellation

This commit is contained in:
ClemensFischer 2025-08-21 22:40:51 +02:00
parent 6f82f8012a
commit 2cf8636f4c
7 changed files with 86 additions and 131 deletions

View file

@ -5,8 +5,6 @@ using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using System.Xml.Linq;
using System.Threading;
#if WPF
using System.Windows;
using System.Windows.Media;
@ -164,7 +162,7 @@ namespace MapControl
/// <summary>
/// Loads an ImageSource from the URL returned by GetMapRequestUri().
/// </summary>
protected override async Task<ImageSource> GetImageAsync(BoundingBox boundingBox, IProgress<double> progress, CancellationToken cancellationToken)
protected override async Task<ImageSource> GetImageAsync(BoundingBox boundingBox, IProgress<double> progress)
{
ImageSource image = null;
@ -187,7 +185,7 @@ namespace MapControl
if (uri != null)
{
image = await ImageLoader.LoadImageAsync(new Uri(uri), progress, cancellationToken);
image = await ImageLoader.LoadImageAsync(new Uri(uri), progress);
}
}
else
@ -210,7 +208,7 @@ namespace MapControl
if (uri1 != null && uri2 != null)
{
image = await ImageLoader.LoadMergedImageAsync(new Uri(uri1), new Uri(uri2), progress, cancellationToken);
image = await ImageLoader.LoadMergedImageAsync(new Uri(uri1), new Uri(uri2), progress);
}
}
}