Label placement is a global process that can take into account all labels of all layers. The most important aspect of this is the label placement algorithm. It contains the logic to determine where the labels of the layer are placed. You can make sure a specific label placement algorithm is used for a layer by configuring it in your layer factory.

Other aspects of the label placement process can be configured by registering a ILcyGXYLabelPlacementHintProvider as a service (see Services documentation and TLcyGXYCompositeLabelPlacementHintProvider). The map components produced by the 2D map add-on use these hint providers to create a composite labeling algorithm for the entire map.

A label placement hint provider returns a TLcyGXYLabelPlacementHint for a layer that controls the following:

  • the label placement group. Labels from the same label group are placed together and will typically (depending on the label algorithm implementation) not overlap with each other. Using different groups for different layers can speed up performance and make sure that certain labels are not affected by certain other labels. An example of this is a moving track label that should not affect the underlying country labels. By default, Lucy’s formats use either the "background" or the "realtime" group. This can be modified in each format’s configuration file.

  • the label obstacle provider, providing the locations of places where no label from the same labeling group may be put.