ArcGIS Pro 3.4 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.
Version

OnAddToMap(Map,ILayerContainerEdit,Int32) Method
Add the item to the map or groupLayer at the specified index.
Syntax

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