Item(Index: Integer): IMapVisual;
Index - indicator index in the collection.
The Item property returns the collection indicator by its index.
Executing the example requires a form, a button named Button1 on the form, the UiMap component named UiMap1 that is a data source for the MapBox component. A map containing the Regions layer should be linked to the UiMap1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Map: IMap;
Layer: IMapLayer;
Visuals: IMapLayerVisuals;
Vis: IMapVisual;
i: Integer;
Begin
Map := UiMap1.Map;
Layer := Map.Layers.FindByName("Regions");
Visuals := Layer.Visuals;
For i := 0 To Visuals.Count - 1 Do
Vis := Visuals.Item(i);
Debug.WriteLine(Vis.Name);
End For;
End Sub Button1OnClick;
After executing the example the console window displays names of all indicators available in the Regions layer.
See also: