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>
|
||||
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;
|
||||
}
|
||||
|
|
@ -246,9 +246,9 @@ namespace MapControl
|
|||
{ "STYLES", WmsStyles ?? "" },
|
||||
{ "FORMAT", "image/png" },
|
||||
{ "CRS", GetCrsValue() },
|
||||
{ "BBOX", GetBboxValue(rect.Value) },
|
||||
{ "WIDTH", Math.Round(viewScale * rect.Value.Width).ToString("F0") },
|
||||
{ "HEIGHT", Math.Round(viewScale * rect.Value.Height).ToString("F0") }
|
||||
{ "BBOX", GetBboxValue(mapRect.Value) },
|
||||
{ "WIDTH", Math.Round(viewScale * mapRect.Value.Width).ToString("F0") },
|
||||
{ "HEIGHT", Math.Round(viewScale * mapRect.Value.Height).ToString("F0") }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue