ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMappableItem Interface / OnAddToMap Method / OnAddToMap(Map,ILayerContainerEdit,Int32) Method
The map to which the item will be added.
A group layer to which the item will be added. If the group layer is null, then the item will be added directly to the map.
The position within the map or group layer. 0 represents the top most position.

In This Topic
    OnAddToMap(Map,ILayerContainerEdit,Int32) Method
    In This Topic
    Add the item to the map or groupLayer at the specified index.
    Syntax
    Overloads Function OnAddToMap( _
       ByVal map As Map, _
       ByVal groupLayer As ILayerContainerEdit, _
       ByVal index As Integer _
    ) As List(Of String)

    Parameters

    map
    The map to which the item will be added.
    groupLayer
    A group layer to which the item will be added. If the group layer is null, then the item will be added directly to the map.
    index
    The position within the map or group layer. 0 represents the top most position.

    Return Value

    The set of Uris for any data created.
    Remarks
    This method is typically called when the item is dragged/dropped onto the TOC.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also