The migration map can show the migration path of the features according to the start and end information of the features. The MigrationLayer object defines the attributes of the migration map.

Attribute list

Attribute Type Description

layerType

string

[Required]

The layer type. Fixed constant: "MIGRATION".

name

string

[Required]

The layer name.

visible

boolean

[Required]

The visibility of the layer.

featureType

string

[Required]

The feature type of the layer. The feature type of the migration map is "POINT" or "POLYGON".

projection

string

[Required]

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

dataSource

DataSource

[Required]

The data source of the migration map is one of the following four data sources:

 PortalDataSource, SampleData, RestData, UserData.

from Position

[Required]

The starting point of migration.

to Position

[Required]

The end point of migration.

lineSetting

LineSetting

[Required]

Migrating line settings.

animationSetting AnimationSetting

[Required]

Animation special effects settings.

labelSetting

LabelSetting

[Required]

Label settings of the migration map.

legendSetting

LegendSetting

[Optional]

Legend settings of the migration map.

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.

autoUpdateTime

number

[Optional]

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

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"}.

Example

Create a MigrationLayer that conforms to the WebMap specification.

 {

    "layers": [

        {

            "layerType": "MIGRATION",

            "name": "China Earthquake Intensity Regionalization",

            "visible": true,

            "featureType": "POLYGON",

            "projection": "EPSG:4326",

            "enableFields": [

                "Intensity value",

                "dataviz_featureID"

            ],

            "from": {

                "type": "XY_FIELD",

                "xField": "dataviz_featureID",

                "yField": "dataviz_featureID"

            },

            "to": {

                "type": "XY_FIELD",

                "xField": "dataviz_featureID",

                "yField": "dataviz_featureID"

            },

            "lineSetting": {

                "color": "#62AD16",

                "type": "solid",

                "width": 1,

                "opacity": 0.6,

                "curveness": 0.2

            },

            "animationSetting": {

                "show": false,

                "constantSpeed": 40,

                "symbol": "pin",

                "symbolSize": 15

            },

            "labelSetting": {

                "show": false,

                "color": "#62AD16",

                "fontFamily": "Microsoft Yahei"

            },

            "dataSource": {

                "type": "PORTAL_DATA",

                "serverId": "645697778",

                "accessType": "DIRECT"

            }

        }

    ],

 }