Loding WMS Layer

Hello again,

as stated in my last post (not published yet) I moved to MapWinGis WmsLayer functionality to display Wms-maps. The problem in my last try was, I got the extents mixed up (I accidentally swaped the X- and Y-Values).

Just to round this thread up - this is the code which did the Job:

' Test WMS
Dim objWmsLayer As MapWinGIS.WmsLayer
Dim objExtents As MapWinGIS.Extents
Dim intLayerHandle As Integer

Set objExtents = New MapWinGIS.Extents
Set objWmsLayer = New MapWinGIS.WmsLayer
objExtents.SetBounds 444247.640297, 5181048.300034, 0, 914153.8116, 5665064.52217, 0

objWmsLayer.BaseUrl = "https://www.lfu.bayern.de/gdi/wms/wasser/ueberschwemmungsgebiete"
objWmsLayer.BoundingBox = objExtents
objWmsLayer.DoCaching = False
objWmsLayer.Epsg = 25832
objWmsLayer.Format = "image/png"
objWmsLayer.Layers = "hwgf_hqhaeufig"
objWmsLayer.name = "Hochwassergefahrenfl?chen HQh?ufig"
objWmsLayer.Opacity = 63
objWmsLayer.UseCache = False
objWmsLayer.TransparentColor = 255
objWmsLayer.UseTransparentColor = True

intLayerHandle = Me.mapMain.addLayer(objWmsLayer, True)

Me.mapMain.LayerVisible intLayerHandle, True
Me.mapMain.Redraw

Thank you again for your help