ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ILayerFactory Interface / CreateLayer Method / CreateLayer<T>(LayerCreationParams,ILayerContainerEdit) Method
Expected Layer Type
Can be one of LayerCreationParams derived objects.
A map or group layer instance to which the Layer will be added.
Version

CreateLayer<T>(LayerCreationParams,ILayerContainerEdit) Method
Creates a new Layer instance using the specified LayerCreationParams and adds that to a container such as a map or group layer. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

layerParams
Can be one of LayerCreationParams derived objects.
container
A map or group layer instance to which the Layer will be added.

Type Parameters

T
Expected Layer Type

Return Value

A specific Layer instance corresponding to type T.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also