I am using WmsRasterLayer to connect to user-configurable WMS sources (i.e.: user configures the WmsRasterLayer connection parameters). In testing, I've seen that WmsRasterLayer seems to be performing an internal validation of at least some connection parameters against the capabilities published by the WMS source. For example, if the map projection is not explicitly included in the CRS list published in the WMS capabilities, I see an exception like the following, apparently before any attempt is made to actually use the map CRS to retrieve a map from the WMS:
System.ArgumentException occurred
Message=This CRS is not supported in the Wms server: <WMS server ULR>
Source=MapSuiteCore
StackTrace:
at mBQ=.Qzw=.Pz0=(String QD0=, Collection`1 QT0=, String Qj0=)
InnerException:
In theory, this would be fine. However, we're also seeing that some WMS products are reporting either oddly formatted or incomplete CRS lists, and the validation is preventing request of map images that could actually be retrieved successfully. Is there any way to bypass this validation in WmsRasterLayer (e.g.: via a property, event, or a virtual method)? If not, is the only option to re-implement WmsRasterLayer from scratch?
Thanks,
Nicole