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
15d0390d11
commit
a7ff9fe97a
|
|
@ -228,9 +228,9 @@ namespace MapControl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual string GetMapRequestUri(BoundingBox boundingBox)
|
protected virtual string GetMapRequestUri(BoundingBox boundingBox)
|
||||||
{
|
{
|
||||||
var rect = ParentMap.MapProjection.BoundingBoxToMap(boundingBox);
|
var mapRect = ParentMap.MapProjection.BoundingBoxToMap(boundingBox);
|
||||||
|
|
||||||
if (!rect.HasValue)
|
if (!mapRect.HasValue)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -246,9 +246,9 @@ namespace MapControl
|
||||||
{ "STYLES", WmsStyles ?? "" },
|
{ "STYLES", WmsStyles ?? "" },
|
||||||
{ "FORMAT", "image/png" },
|
{ "FORMAT", "image/png" },
|
||||||
{ "CRS", GetCrsValue() },
|
{ "CRS", GetCrsValue() },
|
||||||
{ "BBOX", GetBboxValue(rect.Value) },
|
{ "BBOX", GetBboxValue(mapRect.Value) },
|
||||||
{ "WIDTH", Math.Round(viewScale * rect.Value.Width).ToString("F0") },
|
{ "WIDTH", Math.Round(viewScale * mapRect.Value.Width).ToString("F0") },
|
||||||
{ "HEIGHT", Math.Round(viewScale * rect.Value.Height).ToString("F0") }
|
{ "HEIGHT", Math.Round(viewScale * mapRect.Value.Height).ToString("F0") }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue