Class: Theme

SuperMap.Feature.Theme

The thematic feature base class. This class cannot be initialized.

new SuperMap.Feature.Theme()

Theme.js, line 7

Classes

Bar
Bar3D
Circle
Graph
Line
Pie
Point
RankSymbol
Ring
Vector

Members

dataObject

{ReadOnly} User data, used to generate visible shape, and can define data format and type in the sub class. e.g.: <SuperMap.Feature.Vector> 。

idstring

Unique identification of thematic elements

layerSuperMap.Layer.Theme

{ReadOnly} Thematic layer where thematic features are.

locationArray

Thematic feature pixel reference position. In general, it is determined by geographic reference. It is an array, the first element is x coordinate, and the second element is y coordinate.

Thematic feature geographic reference position. In sub class, it is assigned by user data (or geographic position parameter).

shapesArray

{ReadOnly} The visible shape array by thematic features. The order of the array controls the render.

Methods

SuperMap.Feature.Theme.getDataValues(data, fields, decimalNumber){Array.<string>}

Graph.js, line 477

According to the field name array get the attribute value array of the feature. The type of attribute must be Number.

Name Type Description
data SuperMap.Feature.Vector

Data.

fields Array.<string>

Field name array.

decimalNumber number

Decimal processing parameter

Returns:
Type Description
Array.<string> Attribute data values array of the field name array.

constructor(data, layer){SuperMap.Feature.Theme}

Theme.js, line 14

The Constructor.

Name Type Description
data Object

User data which is used to generate visible shape. Required.

layer SuperMap.Layer.Theme

The layer the theme element is in, required.

Returns:
Type Description
SuperMap.Feature.Theme Return a thematic feature.

destroy()

Theme.js, line 75

Destroys thematic features.

getLocalXY(coordinate){Array}

Theme.js, line 89

Conversion of geographic coordinates to pixel coordinates.

Name Type Description
coordinate SuperMap.Geometry.Point | SuperMap.Geometry.GeoText | SuperMap.LonLat

Geo coordinate point.

Returns:
Type Description
Array The length of an array is 2, the first element to represent the X coordinates, the second elements to represent the Y coordinates. olution();