We are in the process of upgrading from Winforms 10 to Winforms 14. There is a lot of code that simply does not work following the upgrade. In this case we are attempting to retrieve a list of available layer names from a WMTS server using the method WmtsAsyncLayer.GetServerLayerNames. Before calling this method we open the layer using OpenAsync. When the method is called, the following exception is thrown:
System.InvalidOperationException: The FeatureSource is not open. Please call the Open method before calling this method.
at ThinkGeo.Core.ValidatorHelper.CheckFeatureSourceIsOpen(Boolean isOpen)
at ThinkGeo.Core.WmtsAsyncLayer.GetServerLayerNames()
at ThinkGeo_14_Demo.Form1.VB$StateMachine_31_mAddWmtsLayer.MoveNext() in C:\Users\steller\source\repos\ThinkGeo_14_Demo\Form1.vb:line 156
NOTE: If we set the property ActiveLayerName before calling OpenAsync the exception is not thrown. The problem is we don’t know what the layers are before we call GetServerLayerNames.
I have attached a sample project to demonstrate the issue.
Thanks!
Steve
ThinkGeo_14_Demo.zip (742.6 KB)