IMapTopobaseShape.Owner

Syntax

Owner: IMapLayer;

Description

The Owner property returns the layer owning the area.

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;

s: String;

Begin

M := UiMap1.Map;

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

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

s := Shape.Owner.Name;

End Sub Button1OnClick;

After executing the example on clicking the button the name of the layer, that owns the first area, is saved to the s variable.

See also:

IMapTopobaseShape