L.supermap.rankSymbolThemeLayer(name, symbolType, options)
The rank symbol thematic map draws symbols for each element to reflect the corresponding thematic value. It can only express attribute information of a single field. Rank symbol thematic maps are usually used to show demographic information, for example, GDP, Crop product, and population of each state. It can clearly show the distribution differences of value in various regions by the rank symbol thematic map. Currently it provides a statistical chart type: circle.(Follow up: shape of heart, star, polyhedrosis, image and so on)
| Name | Type | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
The name for the layer. |
||||||||||||||||||||||||||||||||
symbolType |
SuperMap.ChartType |
Symbol type, required, currently supports: "Circle" |
||||||||||||||||||||||||||||||||
options |
Object |
The optional parameters.
|
Extends
Members
-
symbolSettingObject
-
Symbol Circle configuration object.
Properties:
Name Type Default Description codomainArray Domain, an array with the length of 2, the first one is the minimum, the second one is the maximum value, required.
maxRnumber optional The maximum radius of the circle.
minRnumber optional The minimum radius of the circle.
fillColorstring optional A circular fill color, such as: fillColor: "#FFB980".
circleStyleObject optional The base style of the circle, this parameter controls the circular base style, with a lower priority than circleStyleByFields and circleStyleByCodomain.
decimalNumbernumber optional Data value array dataValues elements of the decimal value, the decimal processing parameters of data, range: [0, 16]. If you do not set this parameter in data value is not a digital data processing.
circleHoverStyleObject optional The style of hover status for the circle. Valid when circleHoverAble is true.
circleHoverAbleboolean true optional Whether to allow the usage of hover status for circle. Default value is yes. Meanwhile, circleHoverAble and circleClickAble are set to false to disable response of grahics to thematic layer events.
circleClickAbleboolean true optional Whetehr to allow circle to be selected. The default value is yes. Meanwhile, circleHoverAble and circleClickAble are set to false to disable response of grahics to thematic layer events.
Methods
-
inherited addFeatures(features)
GraphThemeLayer.js, line 65 -
Add data to the thematic map layer. The supported feature types are the feature JSON object returned by iServer or the L.supermap.themeFeature type.
Name Type Description featuresSuperMap.ServerFeature | L.supermap.themeFeature | GeoJSONObject Data needs to add.
-
inherited clear()
GraphThemeLayer.js, line 333 -
Clear layer. The clear ones inlcude data (features), theme features, and cache.
-
inherited clearCache()
GraphThemeLayer.js, line 293 -
Clear cache.
-
createThematicFeature(feature){SuperMap.Feature.Theme}
RankSymbolThemeLayer.js, line 57 -
Create the thematic feature(chart).
Name Type Description featureSuperMap.Feature.Vector The feature thematic to create.
Returns:
Type Description SuperMap.Feature.Theme The thematic feature. -
inherited drawCharts()
GraphThemeLayer.js, line 159 -
Draw charts, including overlapping processing.
-
inherited getShapesByFeatureID(featureID)
GraphThemeLayer.js, line 185 -
Get all the graphics associated with feature by FeatureID. the function will return all the graphics if no parameter pass in.
Name Type Description featureIDnumber ID of the feature.
-
inherited getWeightFieldValue(feature, weightField, defaultValue)
GraphThemeLayer.js, line 347 -
Get value of weight field.
Name Type Description featureSuperMap.Feature.Vector The vector feature.
weightFieldArray.<string> node array of weight field.
defaultValuenumber value of weight field. When the weight value is not obtained through the weightField, defaultValue is used as the weight value.
-
inherited isChartInMap(mapPxBounds, chartPxBounds)
GraphThemeLayer.js, line 270 -
Determine whether a chart is in a map.
Name Type Description mapPxBoundsSuperMap.Bounds Map pixel range.
chartPxBoundsArray.<Object> Quadrilateral node array of chart range. For example: [{"x":1,"y":1},{"x":3,"y":1},{"x":6,"y":4},{"x":2,"y":10},{"x":1,"y":1}].
-
inherited isPointInPoly(pt, poly)
GraphThemeLayer.js, line 254 -
Determine whether a point is in a polygon. (Ray method)
Name Type Description ptObject A point object that needs to be determined, which contains the attribute x (abscissa), and the attribute y (ordinate).
polyArray.<Object> Polygon node array. For example, a quadrilateral: [{"x":1,"y":1},{"x":3,"y":1},{"x":6,"y":4},{"x":2,"y":10},{"x":1,"y":1}].
-
inherited isQuadrilateralOverLap(quadrilateral, quadrilateral2)
GraphThemeLayer.js, line 207 -
Judge whether two quadrangles is overlapped.
Name Type Description quadrilateralArray.<Object> Quadrilateral node array.
quadrilateral2Array.<Object> Node array of the second quadrilateral.
Example
[{"x":1,"y":1},{"x":3,"y":1},{"x":6,"y":4},{"x":2,"y":10},{"x":1,"y":1}]; -
inherited redraw()
GraphThemeLayer.js, line 323 -
Redraw this layer. Return true if successful; otherwise, false.
-
inherited redrawThematicFeatures(bounds)
GraphThemeLayer.js, line 90 -
Redraw all the thematic elements. This function contains all the steps to draw a thematic element, including the conversion of user data to thematic elements, overlapping processing, caching and other steps. This function is called for layer refresh when map roaming.
Name Type Description boundsL.bounds The redrawn region.
-
inherited removeAllFeatures()
GraphThemeLayer.js, line 313 -
Remove all features from the layer.
-
inherited removeFeatures(features)
GraphThemeLayer.js, line 302 -
Delete feature from the thematic map. This function deletes all passed vector features (data). each item in the features array must have been added to the feature in current layer.
Name Type Description featuresArray.<SuperMap.Feature.Vector> feature array to delete.
-
inherited setChartsType(chartsType)
GraphThemeLayer.js, line 55 -
Set the chart type, this function can dynamically change the chart type. Before calling this function related configuration needs to be set for the new type by chartsSetting. Currently supports: "Bar", "Bar3D", "Line","Point","Pie","Ring".
Name Type Description chartsTypestring Chart type, currently supports: "Bar", "Bar3D", "Line","Point","Pie","Ring".
-
setSymbolType(symbolType)
RankSymbolThemeLayer.js, line 45 -
Set the symbol type, this function can dynamically change the symbol type. Before calling this function related configuration needs to be set for the new type by chartsSetting.
Name Type Description symbolTypeSuperMap.ChartType The symbol type, currently supports: "Circle".