Class: ThemeLabelItem

SuperMap.ThemeLabelItem

The ThemeLabelItem class.

new SuperMap.ThemeLabelItem(options)

ThemeLabelItem.js, line 5

On a label map, point, line, and region objects are annotated with thematic values. Note that a range label map allows users to choose a numerical field via the rangeExpression field for ranging.
Labels of the same range have the same display style. Every range is an item of the thematic map, and every item has a name, a style, a start value, and an end value.
Note: Each range represents the extent [Start, End). For example, suppose a label map has two items representing two ranges [0,5) and [5,10)
In this case, the setting should be as follows: ThemeLabelItem[0].start=0, ThemeLabelItem[0].end=5, ThemeLabelItem[1].start=5, ThemeLabelItem[1].end=10.

Name Type Description
options Object

The parameters.

Name Type Default Description
caption string optional

The item name of the thematic map.

end number 0 optional

The end value of the item of the Label thematic map.

start number 0 optional

The start value of the item of the Label thematic map.

visible boolean true optional

The visibility of the item of the Label thematic map.

style SuperMap.ServerTextStyle optional

The display style of the item of the Label thematic map.

Members

captionstring

The caption of an item of a label map.

endnumber

The end value of the item of the Label thematic map. If this item is the last one among the ranges, its end value is the maximum value of all ranges; if this item is not the last one, its end value must be the same as the start value of the next item, or the system will throw an exception.

startnumber

The start value of the item of the Label thematic map. If this item is the first one among the ranges, its start value is the minimum value of all ranges; if it is not the first item, its start value must be the same as the end value of the previous item, or the system will throw an exception.

The display style of the item of the label thematic map. The styles ordered from higher priorities to lower priorities are:
uniformMixedStyle (a mixed style for label texts), ThemeLabelItem.style (a text style for range items), and uniformStyle (a unified text style).

visibleboolean

The visibility of the item of the Label thematic map. The visibility of the item of the Label thematic map. The value is true if the item of the label map is visible, or is false otherwise.

Default Value:
true

Methods

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

ThemeLabelItem.js, line 80

Getting subitems of the segmented label thematic map from the incoming object.

Name Type Description
obj Object

the incoming object.

Returns:
Type Description
SuperMap.ThemeLabelItem ThemeLabelItem object.

destroy()

ThemeLabelItem.js, line 64

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