new SuperMap.ThemeLabel(options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
The parameters.
|
Extends
Members
-
alongLineSuperMap.ThemeLabelAlongLine
-
The ThemeLabelAlongLine class. This class can be used to set whether labels annotate along lines as well as the styles of the labels. This field can be used to specify whether flow display is applied to the labels and the leader line style are applied.
-
backgroundSuperMap.ThemeLabelBackground
-
The ThemeLabelBackground class. This class can be used to set the background shape and style of a label.
-
The class for setting the flow display and leader line style for a label thematic map. This field can be used to set whether the label symbols are the flow display and leader line style.
-
itemsArray.<SuperMap.ThemeUniqueItem>
-
The array of the ThemelabelItem. rangeExpression is used to specify a numerical field to be the ranging data for the range label map.
The range division [start,end) of every sub-object in the items must come from the field values specified by the rangeExpression attribute. Every item has its own style. -
labelExpressionstring
-
The label field expression. The system displays the values of the field or the field expression corresponding to labelExpression in the map as labels. The required field.
-
labelOverLengthModeSuperMap.LabelOverLengthMode
-
The LabelOverLengthMode class. A label with a length larger than the assigned maximum length, maxLabelLength, is called an overlength label.
- Default Value: SuperMap.LabelOverLengthMode.NONE
matrixCellsArray.<SuperMap.LabelMatrixCell>
The matrix label element array for making a matrix label map. Symbols or images can be put in the array as matrix label elements.
maxLabelLengthnumber
The maximum length that can be displayed in a line of a label. One Chinese character occupies a space of two characters. If the length of a label exceeds the maximum length, the display can be handled in one of the two ways: displaying the label in multiple lines; or displaying the label with an ellipsis. The default maximum line is 256 characters.
- Default Value: 256
memoryDataSuperMap.ThemeMemoryData
The ThemeMemoryData
The way of making thematic maps with the ThemeMemoryData and the ways of making thematic maps are mutually exclusive, the former has higher priority。
The first parameter represents the thematic value, that is, the data set is used to do the values of the fields or expressions of the thematic graph.
The second parameters represent the external values. In the production of a thematic map, the external value is used instead of the topic value to make the corresponding thematic maps.
numericPrecisionnumber
This attribute is used to set the precision of the displayed value when the label content is a number. For example, suppose the number corresponding to a label is 8071.64529347. If this attribute is set to 0, the label is displayed as 8071; if this attribute is 1, the displayed number is 8071.6; if this attribute is 3, the displayed number is 8071.645.
offsetSuperMap.ThemeOffset
Sets the object representing the offset of label texts relative to a point within the corresponding feature on a label map.
overlapAvoidedboolean
Whether to prevent the labels overlapped each other. It only aims at text data. If the number of texts is quite large, the overlapped phenomena may no be avoided.
- Default Value: true
rangeExpressionstring
Sets the range field or field expression for a range label map. The values of the field (or field expression) corresponding to this expression should be numeric values. This attribute is used together with the range items. The division values of every sub-item, [start, end), must be from the field values specified by rangeExpression. Lastly, the label field specified by labelExpression (the specific contents to be displayed on the label map) will be displayed as ranges with specific item styles.
smallGeometryLabeledboolean
Determines whether to display labels that are longer than the object to be annotated. The default is false. When the length of the label is greater than that of the corresponding line or region object, the label texts will be displayed all together if this value is true. To display the label clearly and completely, a multi-line mode can be adopted to display the label, given that the length of each line is less than that of the object itself.
The style of Chinese texts in a label.
textSpacenumber
Marking along the line, the distance between two adjacent words, the unit is currently set high.
typestring
type of the thematic mapping.
uniqueExpressionstring
Field or expression for creating unique value thematic map. The data type of this field can be number or char type. When setting expression, it requries operating only between the same data type fields. Required, must be used with labelExpression.
uniqueItemsArray.<SuperMap.ThemeLabelUniqueItem>
Item array of unique value label thematic map. The unique value label thematic map uses rangeExpression to range items.
Methods
-
SuperMap.ThemeLabel.fromObj(obj){SuperMap.ThemeLabel}
ThemeLabel.js, line 272 -
Getting the label thematic map class from the incoming object.
Name Type Description obj
Object The incoming object.
Returns:
Type Description SuperMap.ThemeLabel ThemeLabel object. -
inherited destroy()
Theme.js, line 41 -
Disposes the resource. The property that references resource is set to null.
-
inherited destroy()
Theme.js, line 41 -
Disposes the resource. The property that references resource is set to null.
-
toJSON(){string}
ThemeLabel.js, line 207 -
Transform the themeLabel object to the JSON string.
Returns:
Type Description string the JSON string. -
toServerJSONObject(){Object}
ThemeLabel.js, line 216 -
Turned to the JSON format object.
Returns:
Type Description Object The JSON object.