Added IsHttp(Uri) extension method

This commit is contained in:
ClemensFischer 2025-12-26 06:40:55 +01:00
parent 2961836792
commit 1588171fb4
3 changed files with 8 additions and 3 deletions

View file

@ -163,7 +163,7 @@ namespace MapControl
{
await tile.LoadImageAsync(() => tileSource.LoadImageAsync(tile.ZoomLevel, tile.Column, tile.Row)).ConfigureAwait(false);
}
else if (uri.Scheme != Uri.UriSchemeHttps && uri.Scheme != Uri.UriSchemeHttp || string.IsNullOrEmpty(cacheName))
else if (!uri.IsHttp() || string.IsNullOrEmpty(cacheName))
{
await tile.LoadImageAsync(() => tileSource.LoadImageAsync(uri)).ConfigureAwait(false);
}