mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-09 00:14:51 +00:00
Version 7.3. Added tile and map image progress reporting.
This commit is contained in:
parent
b423cc2d36
commit
3119c0fc9b
32 changed files with 252 additions and 100 deletions
|
|
@ -34,7 +34,14 @@ namespace MapControl
|
|||
|
||||
public static readonly DependencyProperty LayersProperty = DependencyProperty.Register(
|
||||
nameof(Layers), typeof(string), typeof(WmsImageLayer),
|
||||
new PropertyMetadata(null, async (o, e) => await ((WmsImageLayer)o).UpdateImageAsync()));
|
||||
new PropertyMetadata(null,
|
||||
async (o, e) =>
|
||||
{
|
||||
if (e.OldValue != null) // ignore initial property change from GetImageAsync
|
||||
{
|
||||
await ((WmsImageLayer)o).UpdateImageAsync();
|
||||
}
|
||||
}));
|
||||
|
||||
public static readonly DependencyProperty StylesProperty = DependencyProperty.Register(
|
||||
nameof(Styles), typeof(string), typeof(WmsImageLayer),
|
||||
|
|
@ -187,7 +194,7 @@ namespace MapControl
|
|||
/// <summary>
|
||||
/// Loads an ImageSource from the URL returned by GetMapRequestUri().
|
||||
/// </summary>
|
||||
protected override async Task<ImageSource> GetImageAsync()
|
||||
protected override async Task<ImageSource> GetImageAsync(IProgress<double> progress)
|
||||
{
|
||||
ImageSource image = null;
|
||||
|
||||
|
|
@ -203,7 +210,7 @@ namespace MapControl
|
|||
|
||||
if (!string.IsNullOrEmpty(uri))
|
||||
{
|
||||
image = await ImageLoader.LoadImageAsync(new Uri(uri));
|
||||
image = await ImageLoader.LoadImageAsync(new Uri(uri), progress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue