Class: ThemeOffset

SuperMap.ThemeOffset

The ThemeOffset class. Sets the offset of label texts or symbols in the thematic map and whether the offset changes when the map zooms.

new SuperMap.ThemeOffset(options)

ThemeOffset.js, line 4
Name Type Description
options Object

The parameters.

Name Type Default Description
offsetFixed boolean false optional

Whether the current thematic map fixes the offset of label texts or symbols.

offsetX string '0.0' optional

The horizontal offset of the text or symbol relative to point-in-feature in the thematic map.

offsetY string '0.0' optional

The vertical offset of the text or symbol relative to point-in-feature in the thematic map.

Members

offsetFixedboolean

Whether the current thematic map fixes the offset of label texts or symbols. The so-called fixed means the offset of texts or symbols do not change when the map zooms.

offsetXstring

The horizontal offset of the text or symbol relative to point-in-feature in the thematic map. The offset is in map unit. The value of the offset is a constant value or the value expressed by the field expression. For example, if the field expression is SmID, where SmID = 2, then the horizontal offset is 2.

Default Value:
0.0

offsetYstring

The vertical offset of the text or symbol relative to point-in-feature in the thematic map. The offset is in map unit. The value of the offset is a constant value or the value expressed by the field expression. For example, if the field expression is SmID, where SmID = 2, then the horizontal offset is 2.

Default Value:
0.0

Methods

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

ThemeOffset.js, line 55

Get the offset of the text or symbol relative to the element inside from the incoming object

Name Type Description
obj Object

the incoming object.

Returns:
Type Description
SuperMap.ThemeOffset ThemeOffset object.

destroy()

ThemeOffset.js, line 44

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