ArcGIS Pro 2.7 API Reference Guide
CreateMosaicLayer(Item,ILayerContainerEdit,Int32,String,RasterColorizerDefinition) Method

ArcGIS.Desktop.Mapping Namespace > LayerFactory Class > CreateMosaicLayer Method : CreateMosaicLayer(Item,ILayerContainerEdit,Int32,String,RasterColorizerDefinition) Method
An ArcGIS.Desktop.Core.Item.
A map or group layer to which the MosaicLayer will be added.
The index of the layer in the map or group layer.
(Optional) A name to override the default display name of the layer.
(Optional) A RasterColorizerDefinition to override the default ArcGIS.Core.CIM.CIMRasterColorizer of the layer.
Creates a new MosaicLayer using a ArcGIS.Desktop.Core.Item and adds it to a container such as a map or a group layer. Optionally you can provide a name and a RasterColorizerDefinition to override the default display name and ArcGIS.Core.CIM.CIMRasterColorizer, respectively. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Function CreateMosaicLayer( _
   ByVal item As Item, _
   ByVal mapOrGroupLayer As ILayerContainerEdit, _
   ByVal index As Integer, _
   Optional ByVal layerName As String, _
   Optional ByVal colorizerDefinition As RasterColorizerDefinition _
) As MosaicLayer

Parameters

item
An ArcGIS.Desktop.Core.Item.
mapOrGroupLayer
A map or group layer to which the MosaicLayer will be added.
index
The index of the layer in the map or group layer.
layerName
(Optional) A name to override the default display name of the layer.
colorizerDefinition
(Optional) A RasterColorizerDefinition to override the default ArcGIS.Core.CIM.CIMRasterColorizer of the layer.

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LayerFactory Class
LayerFactory Members
Overload List