Number of layers in the map.
[Visual Basic .NET]
Public ReadOnly Property LayerCount As Integer
[C#]
public int LayerCount {get;}
[C++]
HRESULT get_LayerCount(
long* Count
);
[C++]
Parameters
Count [out, retval]
Count is a parameter of type long
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Description
Remarks
LayerCount returns the number of layers in the map that implement IDataLayer.
LayerCount does not include the basic graphics layer (CompositeGraphicLayer) that each map contains nor does it return the graphic layers that can be created into this composite layer.
See Also
IMap Interface | IDataLayer Interface
.NET Snippets
Get FeatureLayer from Layer Index Number |
Zoom to Layer by Index Number |
Get GeoFeatureLayer from Layer Index Number |
Get Index Number from Layer Name |
.NET Samples
Buffer snap agent (Code Files:
BufferSnap) |
Convert part to feature command (Code Files:
ConvertPart) |
Create a custom selection extension by extending ArcObjects (Code Files:
SelectionExtension ZoomToLayerMultiItem) |
Custom selection extension (Code Files:
SelectionExtension) |
Dynamic cache layer manager controller (Code Files:
CacheManagerDlg) |
Editing using a custom form (Code Files:
EditorForm) |
Graphics layers ToolControl (Code Files:
GraphicsLayersListCtrl) |
.NET Related Topics
Add-in coding patterns |
How to create an edit session |