TextOriginOffset: IGxPointF;
The TextOriginOffset property determines the anchor point parameters of the map layer area label.
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. A map should be connected to the UiMap1 component. The map should have area labels set up.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Drawing, ExtCtrls, Forms, and Map system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
M: IMap;
Point: IGxPointF;
Layer: IMapLayer;
Shape: IMapTopobaseShape;
Begin
M := UiMap1.Map;
Layer := M.Layers.FindByName("Regions");
Shape := Layer.Shapes.Item(0);
Point := Shape.TextOriginOffset;
Point.Offset(0.1, 0.3);
Shape.TextOriginOffset:= Point;
End Sub Button1OnClick;
After executing the example, on clicking the button the label of the first area is offset by "0.1" along the X axis, and by "0.3" along the Y axis.
See also: