ThinkGeo.com    |     Documentation    |     Premium Support

WMS layer not responding

I’m trying to connect to a WMS service. Here’s an example.

https://services.ga.gov.au/site_3/services/Bathymetry_Derivatives/MapServer/WMSServer?request=GetCapabilities&service=WMS

At first I couldn’t get the layers from get capabilities because I found this site use xmlns and I need to use namespace manager to access the nodes properly.

After sorting this issue with not getting any layers, I found that when the layer is returned to the map, the SendingWebRequest event is never raised on map refresh so no layer ever appears.

Note that if I use a site that does not use xmlns that info is displayed correctly and the events are raised as expected.

I’m using v10. Am wondering if you can get the site to work.

Thanks,
Damian

Hi Damian,

I cannot reproduce your problem. Attached is a simple sample using your wms service, which works fine, and the SendingWebRequest event is triggerd properly. By the way, there’re 5 layers in the wms service, we used Topographic_Rugosity layer in the sample.

QuickStart.zip (22.8 KB)

Thanks,
Leo

Hi Leo,

I think the issue starts to manifest when we reproject the layer from the native WGS84 lat/long to the UTM coordinate system.

For example,

winformsMap1.MapUnit = GeographyUnit.Meter;
Proj4Projection proj = new Proj4Projection(4326, 32750);

proj.Open();
wmsImageOverlay.ImageSource.Projection = proj;

Not all WMS sites have this issue.

Note as well I am not using WPF or version 12. As such, I am using WmsRasterLayer and not WmsOverlay per your example.

Regards,
Damian

Hi Damian,

I can’t use WmsRasterLayer in my sample, because WmsRasterLayer is an internal class in MapSuiteDesktopForWinForms 10.6.17.

Could you please tell me what specific version was you using? That would be great if you can give us a sample or some complete code snippets.

Thanks,
Leo

I’m using WinForms, not WPF. Version of the packages are 10.6 and I got the most stable release of WMS which says 10.6.5 in the package folder.

Attached example project.

Please note another area of concern is that when I try and convert the bounding box of the layer from lat/long to the projected system, the rectangle shape basically goes to zero dimensions… I suspect that is also an issue, but you can disable that code which sets the current extent and still get the not firing issue.

WMS_Issue_Forms.zip (38.3 KB)

Regards,
Damian

Damian,

Thanks for your sample. We have reproduced your issue and we’re working on it.

Thanks,
Leo

Hi Damian,

We found the WMS layer’s boundingbox is way off after projected to the local UTM which prevents the component sending the requests to the server. We fixed it by avoiding checking the layer’s boundingbox when a projection is applied to a WMS layer.

It’s been fixed in the source code and it will take one or two days before the daily build is available. Attached is the updated sample which will work with the new build (ThinkGeo.MapSuite.Layers.Wms 11.0.0-beta023 or above and ThinkGeo.MapSuite 11.0.0-beta152 or above).

WMS_Issue_Forms(updated).zip (20.7 KB)

Thanks,
Leo

Leo,

Our production environment uses v10 libs of Mapsuite. I don’t see a new update for v10 on NuGet. Please advice. A v11 release is not helpful because the architecture is vastly different from v10.

Regards,
Damian

Hi Leo,

Sorry, I just realized I was confusing v11 beta and v12. I’ll look at v11 and confirm.

Thanks,
Damian

Hi Leo,

This looks to be working now.

Thanks,
Damian

Hi Damian,

I’m glad it works, Let me know if you have more issues.

Thanks,
Leo

Hi Damian,

We found there’s something wrong with the fix, it would cause other problems, so we reverted the fix. If you’re using ThinkGeo.MapSuite 11.0.0-beta152, that’s fine. If you would like to upgrade to 11.0.0-beta153 or above, you need to add the following to get it working.

    wmsImageLayer.Crs = "CRS:84";
    wmsImageLayer.AxisOrder = WmsAxisOrder.XY;

CRS:84 is to get the correct bounding box. The AxisOrder should be YX because the WMS version is 1.3.0, however the server can only recognize XY, so we need to set it to XY.

Thanks,
Leo