mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-31 22:00:12 +01:00
Updated TileImageLoader
This commit is contained in:
parent
3c991d691b
commit
2961836792
|
|
@ -163,7 +163,7 @@ namespace MapControl
|
|||
{
|
||||
await tile.LoadImageAsync(() => tileSource.LoadImageAsync(tile.ZoomLevel, tile.Column, tile.Row)).ConfigureAwait(false);
|
||||
}
|
||||
else if (uri.Scheme != "http" && uri.Scheme != "https" || string.IsNullOrEmpty(cacheName))
|
||||
else if (uri.Scheme != Uri.UriSchemeHttps && uri.Scheme != Uri.UriSchemeHttp || string.IsNullOrEmpty(cacheName))
|
||||
{
|
||||
await tile.LoadImageAsync(() => tileSource.LoadImageAsync(uri)).ConfigureAwait(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace MapControl
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a tile image without an Uri.
|
||||
/// Loads a tile image without an Uri. Called when GetUri returns null.
|
||||
/// </summary>
|
||||
public virtual Task<ImageSource> LoadImageAsync(int zoomLevel, int column, int row)
|
||||
{
|
||||
|
|
@ -41,7 +41,8 @@ namespace MapControl
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a tile image from an Uri.
|
||||
/// Loads a tile image from an Uri. Called when the Uri scheme is neither
|
||||
/// http nor https or when the TileImageLoader is not using an image cache.
|
||||
/// </summary>
|
||||
public virtual Task<ImageSource> LoadImageAsync(Uri uri)
|
||||
{
|
||||
|
|
@ -49,7 +50,8 @@ namespace MapControl
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a tile image from an encoded frame buffer.
|
||||
/// Loads a tile image from an encoded image buffer. Called when the
|
||||
/// TileImageLoader caches image buffers from http or https requests.
|
||||
/// </summary>
|
||||
public virtual Task<ImageSource> LoadImageAsync(byte[] buffer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
</tools:MapLayerMenuItem>
|
||||
<tools:MapLayerMenuItem Text="OpenStreetMap French">
|
||||
<map:MapTileLayer
|
||||
TileSource="http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
TileSource="https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
SourceName="OpenStreetMap French"
|
||||
Description="© [OpenStreetMap France](https://www.openstreetmap.fr/mentions-legales/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
|
||||
</tools:MapLayerMenuItem>
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@
|
|||
</tools:MapLayerMenuItem>
|
||||
<tools:MapLayerMenuItem Text="OpenStreetMap French">
|
||||
<map:MapTileLayer
|
||||
TileSource="http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
TileSource="https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
SourceName="OpenStreetMap French"
|
||||
Description="© [OpenStreetMap France](https://www.openstreetmap.fr/mentions-legales/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
|
||||
</tools:MapLayerMenuItem>
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@
|
|||
</tools:MapLayerMenuItem>
|
||||
<tools:MapLayerMenuItem Text="OpenStreetMap French">
|
||||
<map:MapTileLayer
|
||||
TileSource="http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
TileSource="https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
SourceName="OpenStreetMap French"
|
||||
Description="© [OpenStreetMap France](https://www.openstreetmap.fr/mentions-legales/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
|
||||
</tools:MapLayerMenuItem>
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@
|
|||
</tools:MapLayerMenuItem>
|
||||
<tools:MapLayerMenuItem Text="OpenStreetMap French">
|
||||
<map:MapTileLayer
|
||||
TileSource="http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
TileSource="https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"
|
||||
SourceName="OpenStreetMap French"
|
||||
Description="© [OpenStreetMap France](https://www.openstreetmap.fr/mentions-legales/) © [OpenStreetMap contributors](http://www.openstreetmap.org/copyright)"/>
|
||||
</tools:MapLayerMenuItem>
|
||||
|
|
|
|||
Loading…
Reference in a new issue