Arrows: IMapLayerArrows;
The Arrows property returns the collection of map layer arrows.
Executing the example requires a form with the following components: the Button component named Button1, the MapBox component named MapBox1, and the UiMap component named UiMap1. UiMap1 is a data source for MapBox1. The map must be connected to the UiMap1 component.
The example is a handler of the OnClick event for the Button1 component.
Add links to the ExtCtrls, Forms, and Map system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Map: IMap;
Layer: IMapLayer;
i: Integer;
s: String;
Begin
Map := UiMap1.Map;
Layer := Map.Layers.FindByName("Regions");
s := Layer.Description;
Debug.WriteLine("Description of the Regions layer " + s);
i := Layer.Id;
Debug.WriteLine("Identifier of the Regions layer " + i.ToString);
i := Layer.Shapes.Count;
Debug.WriteLine("Number of areas, of which the Regions layer consists " + i.ToString);
i := Layer.Arrows.Count;
Debug.WriteLine("Number of arrows on the Regions layer " + i.ToString);
s := Layer.AttributeNames.Item(0);
Debug.WriteLine("Name of the first attribute of the Regions layer " + s);
i := Layer.ChildLayers.Count;
Debug.WriteLine("Number of child layers for the Regions layer " + i.ToString);
S := Layer.Owner.Name;
Debug.WriteLine("Name of parent layer for the Regions layer " + s);
i := Layer.Visuals.Count;
Debug.WriteLine("Number of indicators on the Regions layer " + i.ToString);
End Sub Button1OnClick;
After executing the example the console displays information about the Regions layer:
Layer description.
Layer identifier.
Number of areas, of which the layer consists.
Number of arrows on the layer.
Name of the first attribute on the layer.
Number of child layers on the layer.
Name of parent layer on the layer.
Number of indicators.
See also: