Class: ThemeUnique

SuperMap.ThemeUnique

Unique value thematic map.

new SuperMap.ThemeUnique(options)

ThemeUnique.js, line 9

Unique thematic maps use different colors or symbols to shade or represent objects with different values for an attribute. You can select an attribute to create a unique thematic map, for example, the soil type attribute. A unique value map emphasizes on representing quality differences instead of quantity characteristics of a phenomenon. Especially when there are intersections or overlays in the phenomenon, such as ethnic distributions, this class is not recommended.

Name Type Description
options Object

The parameters.

Name Type Default Description
items Array.<SuperMap.ThemeUniqueItem>

The array of ThemeUniqueItem.

uniqueExpression string

Fields or field expressions for the ThemeUnique.

defaultStyle SuperMap.ServerStyle optional

The default style of unique thematic map. Those features that are excluded by the thematic map will use this style to display.

colorGradientType SuperMap.ColorGradientType SuperMap.ColorGradientType.YELLOW_RED optional

The ColorGradientType enumeration.

memoryData SuperMap.ThemeMemoryData optional

The ThemeMemoryData class.

Extends

Members

colorGradientTypeSuperMap.ColorGradientType

The ColorGradientType class. A gradient color type has mixed colors containing a start color that gradually changes to an end color based on a certain algorithm. A gradient color type has mixed colors containing a start color that gradually changes to an end color based on a certain algorithm. But if the styles of several items are set separately (through the Style attribute of the ThemeUniqueItem or ThemeRangeItem class), this color scheme does not apply to those items.

Default Value:
SuperMap.ColorGradientType.YELLOW_RED

defaultStyleSuperMap.ServerStyle

The default style of unique thematic map. Those features that are excluded by the thematic map will use this style to display. The features participating in the making of a unique value map can be set through the item array (items). The features that are not included, i.e., features that do not participate in the representation of the theme with unique values, are displayed with this style.

The array of the ThemeUniqueItem. In Unique thematic mapping, features with the same values are assigned the same rendering style, and each of them is a thematic mapping item. Take a unique value map of administrative districts as an example. The Name field represents the names of the provinces or municipalities, and is the thematic variable. If there are five different values in this field, this administrative district map will have 5 thematic items.

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.

typestring

type of the thematic mapping.

uniqueExpressionstring

Fields or field expressions for the Unique thematic mapping. The data type of this field can be value or char. The values of this field can be numbers or characters. If a field expression is to be set, the involved data must be of the same type.

Methods

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

ThemeUnique.js, line 126

Obtain unique value thematic map class from incoming object.

Name Type Description
obj Object

object.

Returns:
Type Description
SuperMap.ThemeUnique ThemeUnique 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.

toServerJSONObject(){Object}

ThemeUnique.js, line 102

Converts to corresponding JSON object.

Returns:
Type Description
Object corresponding JSON object.