Options
All
  • Public
  • Public/Protected
  • All
Menu

An object literal containing placement instructions for label placement along a path (for example, the path of a line or the outside path of a polygon).

Use the constants from PathLabelPosition for configuring the position of a label. Positions can be combined using a bitwise OR to allow multiple positions. For example ( PathLabelPosition.BELOW | PathLabelPosition.ABOVE ) will allow the label to be positioned using either a BELOW or a ABOVE alignment.

Use the OnPathLabelRepeatOptions for repeating labels along a path. If the property is not provided the label is placed in a single location. LuciadRIA attempts to find an alternative label position if the label is threatened to be outside of the view or when the label position is rejected by the de-cluttering algorithm.

Hierarchy

Overview

Properties

Optional group

group: number | string

The group name for this label style. This can be a custom name or the predefined constant: "NON_DECLUTTERED".

Labels that are painted with the same group name will automatically be decluttered, labels across different groups will not. The only exception to this is "NON_DECLUTTERED". When using this group, all labels inside this group will be painted without label decluttering. This parameter is optional. The default value is "DEFAULT". In practice, this means that - if no group is specified - all labels will be decluttered in the same group.

Optional padding

padding: number

The amount of padding that should be added around the label. This value describes the amount in pixels by which the labels extent should grow for the decluttering purpose. A negative number will be ignored. This parameter is optional. The default is no padding.

Optional perpendicularOffset

perpendicularOffset: number

Defines the perpendicular distance from the path at which a label will be placed. This distance is expressed in pixels. If the value is positive, labels are placed above the path. Negative numbers mean that labels are placed below the path. The positions property is disregarded when the perpendicularOffset property is set to a non-zero value.

Optional positions

The allowed positions when painting labels with this style. This can be any of the constant values defined from PathLabelPosition or in case multiple positions are allowed a bitwise OR of these values or an array of them. If it is an array, the ordering represents the priority. By default, if no positions are specified, the center position is used.

Note: perpendicularOffset property takes priority over positions property.

let labelPriorityStyle = {
  positions: [PathLabelPosition.BELOW, PathLabelPosition.ABOVE]
};

Optional priority

priority: number

Priority for this label style. A lower number means that the label will have a higher probability of being painted. If you do not explicitly assign a priority, the default priority of 0 is applied. The priority can be a negative number if you want to indicate that a label has a higher priority than the default.

Optional repeat

The object that controls how the label is repeated alongside the path. If this property is missing a single label is placed along a path.

Optional rotation

The label rotation setting for this label style. Note that this parameter only affects on-path labeling! This parameter is optional. The default is PathLabelRotation.FIXED_LINE_ANGLE.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method