<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using CIMOGCAPIServiceConnection for adding OGC API layers to map in C# in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-cimogcapiserviceconnection-for-adding-ogc/m-p/1615450#M12920</link>
    <description>&lt;P&gt;We are unable to add OGC API layers to Arcgis Pro using the 3.x API&lt;/P&gt;&lt;P&gt;Our code adds WMS, WFS and WMTS layers using their specific CIMServiceConnection objects, following examples given in the documentation and the pro snippets, when trying similar solutions for&amp;nbsp;CIMOGCAPIServiceConnection creating the layer using LayerFactory throws "System.ArgumentException: 'A user-supplied component or subscriber raised an exception (0x80040208)'"&lt;/P&gt;&lt;P&gt;The code we're trying is:&lt;/P&gt;&lt;P&gt;ArcGIS.Core.CIM.CIMInternetServerConnection server = new ArcGIS.Core.CIM.CIMInternetServerConnection();&lt;BR /&gt;server.URL = url;&lt;/P&gt;&lt;P&gt;ArcGIS.Core.CIM.CIMOGCAPIServiceConnection connection = connection = new ArcGIS.Core.CIM.CIMOGCAPIServiceConnection();&lt;BR /&gt;connection.ServerConnection = server;&lt;/P&gt;&lt;P&gt;ILayerContainerEdit layerContainer = Map;&lt;BR /&gt;&lt;BR /&gt;LayerCreationParams layerCreationParams = new LayerCreationParams(connection);&lt;BR /&gt;layerCreationParams.MapMemberPosition = 0;&lt;BR /&gt;if (title != null)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; layerCreationParams.Name = title;&lt;BR /&gt;layer = LayerFactory.Instance.CreateLayer&amp;lt;Layer&amp;gt;(layerCreationParams, layerContainer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 May 2025 14:04:29 GMT</pubDate>
    <dc:creator>bhaynes</dc:creator>
    <dc:date>2025-05-16T14:04:29Z</dc:date>
    <item>
      <title>Using CIMOGCAPIServiceConnection for adding OGC API layers to map in C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-cimogcapiserviceconnection-for-adding-ogc/m-p/1615450#M12920</link>
      <description>&lt;P&gt;We are unable to add OGC API layers to Arcgis Pro using the 3.x API&lt;/P&gt;&lt;P&gt;Our code adds WMS, WFS and WMTS layers using their specific CIMServiceConnection objects, following examples given in the documentation and the pro snippets, when trying similar solutions for&amp;nbsp;CIMOGCAPIServiceConnection creating the layer using LayerFactory throws "System.ArgumentException: 'A user-supplied component or subscriber raised an exception (0x80040208)'"&lt;/P&gt;&lt;P&gt;The code we're trying is:&lt;/P&gt;&lt;P&gt;ArcGIS.Core.CIM.CIMInternetServerConnection server = new ArcGIS.Core.CIM.CIMInternetServerConnection();&lt;BR /&gt;server.URL = url;&lt;/P&gt;&lt;P&gt;ArcGIS.Core.CIM.CIMOGCAPIServiceConnection connection = connection = new ArcGIS.Core.CIM.CIMOGCAPIServiceConnection();&lt;BR /&gt;connection.ServerConnection = server;&lt;/P&gt;&lt;P&gt;ILayerContainerEdit layerContainer = Map;&lt;BR /&gt;&lt;BR /&gt;LayerCreationParams layerCreationParams = new LayerCreationParams(connection);&lt;BR /&gt;layerCreationParams.MapMemberPosition = 0;&lt;BR /&gt;if (title != null)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; layerCreationParams.Name = title;&lt;BR /&gt;layer = LayerFactory.Instance.CreateLayer&amp;lt;Layer&amp;gt;(layerCreationParams, layerContainer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 14:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-cimogcapiserviceconnection-for-adding-ogc/m-p/1615450#M12920</guid>
      <dc:creator>bhaynes</dc:creator>
      <dc:date>2025-05-16T14:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using CIMOGCAPIServiceConnection for adding OGC API layers to map in C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-cimogcapiserviceconnection-for-adding-ogc/m-p/1620180#M12956</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/908601"&gt;@bhaynes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;could you provide some URLs you're having issues with?&lt;/P&gt;&lt;P&gt;Those URLs have to be publicly accessible so we can test with them.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 18:29:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-cimogcapiserviceconnection-for-adding-ogc/m-p/1620180#M12956</guid>
      <dc:creator>SelimDissem</dc:creator>
      <dc:date>2025-06-02T18:29:30Z</dc:date>
    </item>
  </channel>
</rss>

