Update GeoImage.cs

This commit is contained in:
ClemensFischer 2024-09-09 17:22:33 +02:00
parent 8efcee2585
commit 47ff9096d1

View file

@ -94,18 +94,6 @@ namespace MapControl
else if (element is Shape shape) else if (element is Shape shape)
{ {
shape.Fill = geoImage.ImageBrush; shape.Fill = geoImage.ImageBrush;
#if WPF
MapPanel.GetParentMap(shape).Children.Add(new MapPolygon
{
Stroke = Brushes.Green,
StrokeThickness = 1,
Locations = new LocationCollection(
new Location(boundingBox.North, boundingBox.West),
new Location(boundingBox.North, boundingBox.East),
new Location(boundingBox.South, boundingBox.East),
new Location(boundingBox.South, boundingBox.West))
});
#endif
} }
MapPanel.SetBoundingBox(element, boundingBox); MapPanel.SetBoundingBox(element, boundingBox);
@ -177,7 +165,7 @@ namespace MapControl
{ {
var epsgCode = geoKeyDirectory[i + 3]; var epsgCode = geoKeyDirectory[i + 3];
mapProjection = MapProjectionFactory.Instance.GetProjection(epsgCode) ?? mapProjection = MapProjectionFactory.Instance.GetProjection($"EPSG:{epsgCode}") ??
throw new ArgumentException($"Can not create projection EPSG:{epsgCode}."); throw new ArgumentException($"Can not create projection EPSG:{epsgCode}.");
} }
} }