The graduated symbol map uses the size of the symbol to express the value of the corresponding field or expression (thematic variable) of the element or record. The RankSymbolLayer object defines the attributes of the graduated symbol map.

Attribute list

Attribute Type Description

layerType

string

[Required]

The layer type. Fixed constant: "RANK_SYMBOL".

name

string

[Required]

The layer name.

visible

boolean

[Required]

The visibility of the layer.

opacity

number

[Optional]

The opacity of the layer. The maximum value is 1 and the minimum value is 0.

visibleScale

VisibleScale

[Optional]

Stores the visible scale range of the current layer.

dataSource

DataSource

[Required]

The datasource of the RankSymbolLayer is one of the following five datasources:

 PortalDataSource, SampleData, RestData, UserData, RestMap.

projection

string

[Required]

The projected coordinate system of the map. Optional value: EPSG or WKT universal coordinate system description standard.

featureType

string

[Required]

The feature type. Optional constants: "POINT".

xyField

object<srting>

[Required]

It consists of two sub-attributes "xField" and "yField", which respectively define the name of the field to which the X and Y coordinates of the point feature belong.

style

PointStyle

[Required]

Label style.

themeSetting

RankSymbolThemeSetting

[Required]

Theme settings.

labelStyle

LabelStyle

[Optional]

Label style.

legendSetting

LegendSetting

[Optional]

Legend settings.

searchSetting

SearchSetting

[Optional]

Search settings.

enableFields

array<string>

[Required]

The fields displayed in attribute table

captions

object

[Optional]

The key is the field name, and the value is the user-defined string type field display name, for example: {"ADDRESS":"ADDRESS display name"}.

popupInfo

WithPopupInfo

[Optional]

Settings for the attribute pop-up window.

autoUpdateTime

number

[Optional]

The time for the layer data to be automatically refreshed, in milliseconds.

Example

Construct a RankSymbolLayer that conforms to the WebMap specification.

  {

      "layers": [

        {

            "layerType": "RANK_SYMBOL",

            "name": "National provincial capitals",

            "visible": true,

            "featureType": "POINT",

            "xyField": {

                "xField": "X",

                "yField": "Y"

            },

            "projection": "EPSG:4326",

            "enableFields": [

                "X",

                "Y",

                "Province",

                "Capitals"

            ],

            "style": {

                "radius": 6,

                "strokeWidth": 1,

                "strokeColor": "#ffffff",

                "strokeOpacity": 1,

                "fillOpacity": 0.9,

                "fillColor": "#24B391",

                "type": "BASIC_POINT"

            },

            "themeSetting": {

                "themeField": "X",

                "segmentCount": 6,

                "segmentMethod": "offset",

                "minRadius": 6,

                "maxRadius": 12,

                "customSettings": {}

            },

            "dataSource": {

                "type": "PORTAL_DATA",

                "serverId": "977948035",

                "accessType": "DIRECT"

            }

        }

    ],

 }