Class: ThemeLabelAlongLine

SuperMap.ThemeLabelAlongLine

The ThemeLabelAlongLine class.

new SuperMap.ThemeLabelAlongLine(options)

ThemeLabelAlongLine.js, line 5
Name Type Description
options Object

The parameters.

Name Type Default Description
isAlongLine boolean true optional

Whether to display texts along lines.

alongLineDirection SuperMap.AlongLineDirection SuperMap.AlongLineDirection.LB_TO_RT optional

The direction in which a label annotate along a line.

angleFixed boolean false optional

Whether to fix the labels angle when they are displayed along line.

repeatedLabelAvoided boolean false optional

Whether to avoid redundant labeling when labeling along lines repetitively.

repeatIntervalFixed boolean false optional

Whether to use fixed intervals when labeling repetitively.

labelRepeatInterval number 0 optional

The interval for repetitive labeling along lines.

Members

alongLineDirectionSuperMap.AlongLineDirection

The direction in which a label annotate along a line.

Default Value:
SuperMap.AlongLineDirection.LB_TO_RT

angleFixedboolean

Whether to fix the labels angle when they are displayed along line. If false, meaning to display every character perpendicular to linear features. If the angle is fixed, all labels are displayed with the font rotating angle specified in the text style, and the direction of the labels along the lines are not specified; if the angle is not fixed, the rotating angle and the direction of the labels along the lines are both taken into account when displaying the labels.

isAlongLineboolean

Whether to display texts along lines.If true, meaning the label will be displayed along the line. False means the label will be shown in normal way.

Default Value:
true

labelRepeatIntervalnumber

The interval for repetitive labeling along lines. The length unit is the same as the geographical unit of the map. The labelRepeatInterval is valid only when RepeatedLabelAvoided is set to true.

repeatedLabelAvoidedboolean

Whether to avoid redundant labeling when labeling along lines repetitively.

repeatIntervalFixedboolean

Whether to use fixed intervals when labeling repetitively. true indicates that fixed intervals are used during repetitive labeling, i.e., logic coordinates are used to represent the repetition intervals; false indicates that the label repeating intervals change as one zooms in/out on the map, i.e., geographical coordinates are used to represent the repetition intervals.

Methods

SuperMap.ThemeLabelAlongLine.fromObj(obj){SuperMap.ThemeLabelAlongLine}

ThemeLabelAlongLine.js, line 83

From the incoming object to get the style class along the label.

Name Type Description
obj Object

The incoming object

Returns:
Type Description
SuperMap.ThemeLabelAlongLine ThemeLabelAlongLine object.

destroy()

ThemeLabelAlongLine.js, line 69

Disposes the resource. The property that references resource is set to null.