Class: RankSymbolThemeLayer

mapboxgl.supermap.RankSymbolThemeLayer

The RankSymbolThemeLayer class.

new mapboxgl.supermap.RankSymbolThemeLayer(name, symbolType, opt_options)

RankSymbolThemeLayer.js, line 6
Name Type Description
name string

The name for the layer.

symbolType string

Symbol type

opt_options Object

The optional parameters.

Name Type Default Description
id string optional

Thematic layer ID. The theme layer ID is created by default using CommonUtil.createUniqueID("themeLayer_").

loadWhileAnimating boolean true optional

Whether to redraw in real time.

map mapboxgl.Map

The map object of the current Mapbox GL.

opacity number 1 optional

The transparency of the layer.

themeFields string

Specifies the thematic map field created.

isOverLay boolean true optional

Whether to perform the gland processing, if set to true, the chart that produces the gland on the chart that has been drawn in the layer will be hidden during the chart drawing process.

chartsType string optional

Chart type. Currently available: "Bar", "Line", "Pie".

symbolSetting Object optional

The symbolSetting object of each type of chart can be set. Please refer to the description of the symbolSetting object in the comments of the specific chart model class. The symbolSetting object usually has the following five basic settable properties:

Name Type Description
width number optional

The (chart) width of the thematic elements.

height number optional

The (chart) height of the thematic elements.

codomain Array.<number>

A range of one-dimensional arrays of length 2, with the first element representing the lower bound of the range and the second element representing the upper bound of the range.

XOffset number optional

The offset value of the thematic feature (chart) in the X direction, in pixels.

YOffset number optional

The offset value of the thematic feature (chart) in the Y direction, in pixels.

dataViewBoxParameter Array.<number>

Data view box dataViewBox parameter, which refers to the chart box chartBox (the chart range box consisting of chart position, chart width, chart height) in the left, lower, right, upper four directions, the length of 4 One-dimensional array.

decimalNumber number

Data value array dataValues Element value decimal places, data decimal point processing parameters, value range: [0, 16]. If this parameter is not set, the data is not treated with decimal places when fetching data values.

Extends

Members

idstring

Thematic layer ID.

loadWhileAnimatingboolean

Whether to redraw in real time.(It is recommended to draw a large amount of data elements, it is recommended to set this parameter to false).

Default Value:
true

Map object.

namestring

The name of the thematic layer.

opacityfloat

The opacity of the layer.

Default Value:
1

visibilityboolean

Whether the layer is visible.

Default Value:
true

Events

inherited beforefeaturesadded

GraphThemeLayer.js, line 68

Triggered before the feature is added.

Properties:
Name Type Description
features SuperMap.ServerFeature

The feature to be added.

inherited changelayer

ThemeLayer.js, line 191

Fires after the layer property changes.

Properties:
Name Type Description
layer Object

Layer.

property string

The changed attribute.

inherited featuresremoved

ThemeLayer.js, line 256

Triggered after the feature is deleted.

Properties:
Name Type Description
features Array.<SuperMap.Feature.Vector>

Features that have not been successfully deleted.

succeed boolean

The deletion is successful or not.

Methods

inherited addFeatures(features)

GraphThemeLayer.js, line 62

Add data to the thematic map layer. The supported feature types are: the feature json object returned by iServer.

Name Type Description
features SuperMap.ServerFeature

The feature to be added.

inherited clear()

GraphThemeLayer.js, line 385

The cleared content includes features, thematic elements, and the cache.

inherited clearCache()

GraphThemeLayer.js, line 344

clear cache.

createThematicFeature(feature)

RankSymbolThemeLayer.js, line 49

Create thematic graphic features.

Name Type Description
feature Object

Thematic graphic features to be created.

inherited destroyFeatures(features)

ThemeLayer.js, line 138

Destroy an element.

Name Type Description
features SuperMap.Feature.Vector

The elements that will be destroyed.

inherited display(display)

ThemeLayer.js, line 169

Temporarily hide or show layers. Re-rendering fails by producing immediate effects on CSS controls. The setVisibility method is generally used to dynamically control the display and hiding of layers.

Name Type Description
display boolean optional

Whether to display the layer.

inherited drawCharts()

GraphThemeLayer.js, line 149

Draw a chart. Includes gland handling.

inherited getFeatureBy(property, value){SuperMap.Feature.Vector}

ThemeLayer.js, line 291

Traverses each feature in the feature array features of the thematic map, and returns this feature when feature[property] === value (and returns only the first one).

Name Type Description
property string

The property name of the feature

value string

The value corresponding to property.

Returns:
Type Description
SuperMap.Feature.Vector The first vector feature that matches the attribute and the value.

inherited getFeatureById(featureId){SuperMap.Feature.Vector}

ThemeLayer.js, line 310

Returns the corresponding vector element by giving an id.

Name Type Description
featureId string

The id property of the vector feature

Returns:
Type Description
SuperMap.Feature.Vector The feature corresponding to the id. If it does not exist, return to null.

inherited getFeatures(){SuperMap.Feature.Vector}

ThemeLayer.js, line 277

Get the valid features in the current layer.

Returns:
Type Description
SuperMap.Feature.Vector Return the valid features in the layer.

inherited getFeaturesByAttribute(attrName, attrValue){Array.<SuperMap.Feature.Vector>}

ThemeLayer.js, line 320

Return an array contains all the matched features by giving a key and a value of a an attribute.

Name Type Description
attrName string

The key of the attribute.

attrValue string

The value of the attribute.

Returns:
Type Description
Array.<SuperMap.Feature.Vector> An array contains all the matched features.

inherited getLocalXY(coordinate)

ThemeLayer.js, line 396

Convert the Geographic coordinates to Pixel coordinates.

Name Type Description
coordinate Object optional

The coordinate position.

inherited getShapesByFeatureID(featureID)

GraphThemeLayer.js, line 246

Get all the graphics associated with the feature through the FeatureID. If you do not pass in this parameter, the function will return all graphics.

Name Type Description
featureID number

The ID of the feature.

inherited isChartInMap(mapPxBounds, chartPxBounds)

GraphThemeLayer.js, line 324

Determine if the chart is in the map.

Name Type Description
mapPxBounds SuperMap.Bounds

The range of map pixels.

chartPxBounds Array.<Object>

An array of quadrilateral nodes in the range of the chart.

inherited isPointInPoly(pt, poly)

GraphThemeLayer.js, line 309

Determine if a point is inside a polygon. (ray method)

Name Type Description
pt Object

The point object to be determined, which contains the attribute x (abscissa) and the attribute y (ordinate).

poly Array.<Object>

An array of polygon nodes.

inherited isQuadrilateralOverLap(quadrilateral, quadrilateral2)

GraphThemeLayer.js, line 266

Determine if the two quads have a gland.

Name Type Description
quadrilateral Array.<Object>

An array of quadrilateral nodes.

quadrilateral2 Array.<Object>

An array of the second quadrilateral node.

inherited moveTo(layerID, before)

ThemeLayer.js, line 569

Move the layer before a layer.

Name Type Default Description
layerID string

The layer ID to be inserted.

before boolean true optional

Whether to insert this layer before the layer whose layer id is layerID (if it is false, insert this layer after the layer whose layer id is layerID).

inherited off(event, callback, context)

ThemeLayer.js, line 365

Remove event listeners of the thematic elements.

Name Type Description
event Event

The event listener.

callback function

The callback.

context string

The context.

inherited on(event, callback, context)

ThemeLayer.js, line 349

Add event listeners of the thematic features.

Name Type Description
event Event

The event listener.

callback function

The callback.

context string

The context.

inherited onAdd()

ThemeLayer.js, line 79

Add the layer to the basemap.

inherited redraw()

GraphThemeLayer.js, line 372

Redraw the layer.

inherited redrawThematicFeatures(extent)

GraphThemeLayer.js, line 85

Redraw all thematic elements. This method includes all the steps of drawing the thematic features, including the conversion of user data to thematic features, thinning, caching, and so on. This method is called for layer refresh when the map is roaming.

Name Type Description
extent mapboxgl.LngLatBounds

The scope of redrawing.

inherited removeAllFeatures()

GraphThemeLayer.js, line 363

Remove all features.

inherited removeFeatures(features)

GraphThemeLayer.js, line 353

Remove feature from the thematic map. This function removes all vector features passed in. Each item in the features array in the argument must be a feature that has been added to the current layer.

Name Type Description
features SuperMap.Feature.Vector

The feature to delete.

inherited removeFromMap()

ThemeLayer.js, line 560

Remove the layer.

inherited setChartsType(chartsType)

GraphThemeLayer.js, line 52

Set the type of chart that dynamically changes the chart type. Before calling this function, please use chartsSetting to configure the new type of chart.

Name Type Description
chartsType string optional

Chart type. Currently available: "Bar", "Line", "Pie".

inherited setOpacity(opacity)

ThemeLayer.js, line 178

Set the opacity of the layer, between values [0-1].

Name Type Description
opacity number optional

Opacity.

setSymbolType(symbolType)

RankSymbolThemeLayer.js, line 39

Set the glyph.

Name Type Description
symbolType string optional

Symbol type.

inherited setVisibility(visibility)

ThemeLayer.js, line 156

Set layer visibility, set the layer's hidden, display, and redraw corresponding visible markers.

Name Type Description
visibility boolean optional

Whether to display the layer(The current map's resolution is between the maximum and minimum resolutions).

inherited toFeature(features){SuperMap.Feature.Vector}

ThemeLayer.js, line 414

Convert to the feature in iClient.

Name Type Description
features mapboxgl.supermap.ThemeFeature | GeoJSONObject

The elements to be converted include the mapboxgl.supermap.ThemeFeature type and the GeoJOSN specification data type.

Returns:
Type Description
SuperMap.Feature.Vector The converted iClient element.