Note that there are some explanatory texts on larger screens.

plurals
  1. POArcObject IWMSServiceDescription.get_LayerDescription C# error
    primarykey
    data
    text
    <p>My goal is to connect to a WMS Service and display a layer on my application's map using ESRI's ArcObject API for .NET. </p> <p>Here is the part of my code I am struggling with:</p> <pre><code>... String url = "some value"; String layerTitle = "another value"; ... PropertySet props = new PropertySet(); props.SetProperty("URL", url); WMSConnectionName connectionName = new WMSConnectionName(); connectionName.ConnectionProperties = props; WMSMapLayer mapLayer = new WMSMapLayer(); (mapLayer as IDataLayer).Connect(connectionName as IName); IWMSGroupLayer groupLayer = (IWMSGroupLayer)mapLayer; IWMSServiceDescription serviceDescription = groupLayer.WMSServiceDescription; IWMSLayerDescription layerDescription = serviceDescription.get_LayerDescription(0); groupLayer.CreateWMSLayer(layerDescription); groupLayer.get_Layer(0).Visible = true; ILayer layer = (ILayer)groupLayer; layer.Name = "WxOverlays " + layerTitle; layer.Visible = true; </code></pre> <p>At run time I encounter: </p> <blockquote> <p>System.Runtime.InteropServices.COMException (0x8000FFFF): The supplied command does not exist in the command pool at ESRI.ArcGIS.GISClient.IWMSServiceDescription.get_LayerDescription(Int32 index)</p> </blockquote> <p>A google search revealed that some similar methods in the ArcObject API throw the same exception because they are not supported in C#. Has anyone encountered this before? Anyone see a way around it? Unfortunately, I am stuck using C#, so using Java or something that may have better support from ESRI is out of the question. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload