ThinkGeo.com    |     Documentation    |     Premium Support

Strange behavior with WMSRasterLayer

Hi,

We are using MapSuite for WinForms, the latest stable build for 10.0. Version 1.3.0 of the WMS service is causing problems for us and I have been working on improving the reliability when adding such services to a map. Some services simply will not draw. I have attached a project to demonstrate the problem.

The attached project opens a shapefile of the United States for reference, and also adds a WMS (1.3.0) layer that covers the entire US. In this project, the WMS layer does not draw and does not appear to even be sending requests to the server. Note that if you update the project to NuGet ThinkGeo.MapSuite 11.0.0-beta152 then the layer draws correctly. Also note this: after upgrading the layer only seems to draw correctly when re-projected, not when displayed with the Crs associated with the layer.

Note that if you then update to ThinkGeo.MapSuite 11.0.0-beta153 the WMS layer will no longer draw.

We need to be able to display WMS layers reliably in a production build before we can deploy to our customers. Any help would be appreciated.

Thanks!

SteveWmsWillNotDraw.zip (2.8 MB)

Hi Steven1,

Thanks for your sample, I can reproduce your issue easily.

There’s something improper in your code, the sample is working after fixing them.

Here’re 2 changes:

  1. call moWmsLayer.Open() after setting moWmsLayer’s properties(like Crs, AxisOrder, ActiveLayerNames), because moWmsLayer.Open() would parse the wms xml immediately, if you call it before setting setting moWmsLayer’s properties, these properties wouldn’t take affect.
  2. projection for wms layer is unnecessary, just remove it.

You can also download the sample which is working correctly: WmsWillNotDraw(fixed).zip (2.2 MB)

Thanks,
Leo