IMapTopobasePrimitives.Item

Syntax

Item(Index: Integer): IMapTopobasePrimitive;

Parameters

Index - index of the primitive in the collection.

Description

The property is read-only.

The Item property returns a primitive by the specified index.

Example

Executing the example requires a form with the Button1 button, the MapBox and UiMap components with a loaded map.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

M: IMap;

Layer: IMapLayer;

Shape: IMapTopobaseShape;

Primitiv: IMapTopobasePrimitives;

P: IMapTopobasePrimitive;

Begin

M := UiMap1.Map;

Layer := M.Layers.FindByName("Regions");

Shape := Layer.Shapes.Item(0);

Primitiv := Shape.Primitives;

P := Primitiv.Item(0);

End Sub Button1OnClick;

 

After executing the example on clicking the button the first primitive from the primitives collection of the first area is saved to the P variable.

See also:

IMapTopobasePrimitives