ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MosaicLayer Class
Members Example

In This Topic
    MosaicLayer Class
    In This Topic
    Represents a mosaic layer.
    Object Model
    MosaicLayer ClassDefinitionQuery ClassLayer ClassFeatureMosaicSubLayer ClassCIMDataConnection ClassTimeExtent ClassCIMBaseLayer ClassElevationTypeDefinition ClassFeatureMosaicSubLayer ClassImageMosaicSubLayer ClassFeatureMosaicSubLayer ClassSpatialReference ClassTimeParameters ClassSurfaceZsResult ClassMap ClassILayerContainer InterfaceEnvelope ClassDefinitionQuery Class
    Syntax
    Remarks
    The mosaic layer is a composite layer which is a representation of a mosaic dataset. The mosaic layer is drawn based on the ArcGIS.Core.CIM.CIMRasterColorizer.
    Example
    Create a mosaic layer
    MosaicLayer mosaicLayer = null;
    string url = @"C:\Images\countries.gdb\Italy";
    await QueuedTask.Run(() =>
    {
      // Create a mosaic layer using a path to a mosaic dataset.
      // Note: You can create a mosaic layer from a url, project item, or data connection.
      mosaicLayer = LayerFactory.Instance.CreateLayer(new Uri(url), aMap) as MosaicLayer;
    });
    Create a mosaic layer with a new colorizer definition
      // Create a new colorizer definition using default constructor.
      StretchColorizerDefinition stretchColorizerDef = new StretchColorizerDefinition();
      var rasterLayerCreationParams = new RasterLayerCreationParams(new Uri(url))
      {
        Name = layerName,
        ColorizerDefinition = stretchColorizerDef,
        MapMemberIndex = 0
    
      };
      await QueuedTask.Run(() =>
      {
        // Create a mosaic layer using the colorizer definition created above.
        // Note: You can create a mosaic layer from a url, project item, or data connection.
        MosaicLayer newMosaicLayer =
    LayerFactory.Instance.CreateLayer<MosaicLayer>(rasterLayerCreationParams, aMap);
      });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
          ArcGIS.Desktop.Mapping.MapMember
             ArcGIS.Desktop.Mapping.Layer
                ArcGIS.Desktop.Mapping.CompositeLayer
                   ArcGIS.Desktop.Mapping.MosaicLayer

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also