mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Check for relative URIs first
This commit is contained in:
parent
cd40a627ce
commit
f897ce3d36
2 changed files with 17 additions and 5 deletions
|
|
@ -46,7 +46,11 @@ namespace MapControl
|
|||
|
||||
try
|
||||
{
|
||||
if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
|
||||
if (!uri.IsAbsoluteUri)
|
||||
{
|
||||
image = await LoadImageAsync(uri.OriginalString);
|
||||
}
|
||||
else if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
|
||||
{
|
||||
(var buffer, var _) = await GetHttpResponseAsync(uri, progress);
|
||||
|
||||
|
|
@ -55,9 +59,9 @@ namespace MapControl
|
|||
image = await LoadImageAsync(buffer);
|
||||
}
|
||||
}
|
||||
else if (uri.IsFile || !uri.IsAbsoluteUri)
|
||||
else if (uri.IsFile)
|
||||
{
|
||||
image = await LoadImageAsync(uri.IsAbsoluteUri ? uri.LocalPath : uri.OriginalString);
|
||||
image = await LoadImageAsync(uri.LocalPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue