mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update WmsImageLayer.cs
This commit is contained in:
parent
16a49d89aa
commit
004d9501ad
|
|
@ -36,10 +36,6 @@ namespace MapControl
|
|||
nameof(Styles), typeof(string), typeof(WmsImageLayer),
|
||||
new PropertyMetadata(string.Empty, async (o, e) => await ((WmsImageLayer)o).UpdateImageAsync()));
|
||||
|
||||
public static readonly DependencyProperty FormatProperty = DependencyProperty.Register(
|
||||
nameof(Format), typeof(string), typeof(WmsImageLayer),
|
||||
new PropertyMetadata("image/png", async (o, e) => await ((WmsImageLayer)o).UpdateImageAsync()));
|
||||
|
||||
/// <summary>
|
||||
/// The base request URL.
|
||||
/// </summary>
|
||||
|
|
@ -67,15 +63,6 @@ namespace MapControl
|
|||
set { SetValue(StylesProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requested image format. Default is image/png.
|
||||
/// </summary>
|
||||
public string Format
|
||||
{
|
||||
get { return (string)GetValue(FormatProperty); }
|
||||
set { SetValue(FormatProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all layer names returned by a GetCapabilities response.
|
||||
/// </summary>
|
||||
|
|
@ -157,9 +144,9 @@ namespace MapControl
|
|||
uri += "&STYLES=" + Styles;
|
||||
}
|
||||
|
||||
if (uri.IndexOf("FORMAT=", StringComparison.OrdinalIgnoreCase) < 0 && Format != null)
|
||||
if (uri.IndexOf("FORMAT=", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
{
|
||||
uri += "&FORMAT=" + Format;
|
||||
uri += "&FORMAT=image/png";
|
||||
}
|
||||
|
||||
var rect = projection.BoundingBoxToRect(BoundingBox);
|
||||
|
|
|
|||
Loading…
Reference in a new issue