Primitives: IMapTopobasePrimitives;
The Primitives property determines the collection of the primitives that make up the area.
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;
s: Integer;
Begin
M := UiMap1.Map;
Layer := M.Layers.FindByName("Regions");
Shape := Layer.Shapes.Item(0);
Primitiv := Shape.Primitives;
s := Primitiv.Count;
End Sub Button1OnClick;
After executing the example on clicking the button the number of the primitives, that make up the first area, is saved to thes variable.
See also: