Hi Hartwig,
I am sorry it looks you forget upload the screen shot.
I did some modify of your code(it’s a c# version), and as below is my test code and test result.
Please let me know whether it have problem, it looks the wms mainly contains Germany but still have some places in other countries.
Test code:
private void DisplayMap_Load(object sender, EventArgs e)
{
winformsMap1.MapUnit = GeographyUnit.Meter;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
winformsMap1.CurrentExtent = new RectangleShape(192531.239288, 6163612.41831, 1083997.36936, 5150683.56113);
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"…\SampleData\Data\Countries02.shp");
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Country1(“CNTRY_NAME”);
LayerOverlay overlay = new LayerOverlay();
overlay.Layers.Add(worldLayer);
winformsMap1.Overlays.Add(overlay);
ManagedProj4Projection proj4 = new ManagedProj4Projection();
proj4.InternalProjectionParametersString = ManagedProj4Projection.GetDecimalDegreesParametersString();
proj4.ExternalProjectionParametersString = ManagedProj4Projection.GetEpsgParametersString(25832);
proj4.Open();
worldLayer.FeatureSource.Projection = proj4;
loadWMS("sg.geodatenzentrum.de/wms_dtk200?", 25832, “DTK200”);
winformsMap1.Refresh();
}
private void loadWMS(string url, int epsg, string layer)
{
Uri theUrl = new System.Uri(url);
WmsRasterLayer wms = new WmsRasterLayer(theUrl);
wms.SendingWebRequest += new EventHandler<SendingWebRequestEventArgs>(wms_SendingWebRequest);
wms.Transparency = 150;
if (epsg > 0)
{
wms.Crs = “EPSG:” + epsg;
}
wms.Open();
wms.ActiveLayerNames.Add(layer);
LayerOverlay wmsOverlay = new LayerOverlay();
wmsOverlay.Name = “WMS”;
wmsOverlay.Layers.Add(wms);
winformsMap1.Overlays.Add(wmsOverlay);
}
void wms_SendingWebRequest(object sender, SendingWebRequestEventArgs e)
{
Debug.WriteLine(e.WebRequest.RequestUri.AbsoluteUri);
}
Regards,
Don