目录

Request Parameters

Coordinate

Parameter

Mandatory

Type

Description

lat

Yes

double

Latitude. The value range is [-90, 90].

lng

Yes

double

Longitude. The value range is [-180, 180].

matchType

No

int

Indicates whether road binding is restricted for the departure place and destination.

The options are 0 (default) and 1.

  • 0: Road binding is restricted. Do not bind closed roads, roads under construction, traffic restricted roads, and roads set to avoid for the departure place. Do not bind highways, ferries, and roads set to avoid for the destination.
  • 1: Road binding is not restricted.
    NOTE:

    Currently, this parameter is available only for Directions API.

Condition

Parameter

Mandatory

Type

Description

name

Yes

String

Condition name.

field

Yes

String

Attribute name of vector data.

operator

Yes

String

Operator. Supported operators are =, !=, <, >, <=, >=, like, and not like.

value

Yes

String

Value.

DataCfg

Parameter

Mandatory

Type

Description

minZoom

Yes

integer

Minimum zoom level.

maxZoom

Yes

integer

Maximum zoom level.

bbox

No

String[]

Slicing range, including the longitude and latitude of the southeast corner and northwest corner.

filter

No

DataFilter

Rule for filtering vector data.

resampling

No

String

Raster data resampling algorithm. The options are as follows:

  • average (default)
  • bilinear

DataFilter

Parameter

Mandatory

Type

Description

conditions

Yes

Condition[]

Criteria for filtering vector data.

logics

Yes

String

Logical relationship between criteria. The options are or, and, (, and ).

Fill

Parameter

Mandatory

Type

Description

strokeColor

No

String

Stroke color.

strokeWidth

No

integer

Stroke width. The default value is 1.

strokeLineDash

No

Integer[]

Dashed stroke line.

fillColor

No

String

Fill color.

fillOpacity

No

number($float)

Fill color transparency. The value range is [0, 1]. The default value is 1.

Icon

Parameter

Mandatory

Type

Description

url

No

String

Icon URL, which must be accessible through the Internet.

anchor

No

String

Relative anchor position of the icon. The value range is [center, left, right, top, bottom, top-left, top-right, bottom-left, bottom-right]. The default value is center.

scale

No

number($float)

Icon size. The value must be greater than or equal to 0. The default value is 1.

opacity

No

number($float)

Transparency. The value range is [0, 1].

color

No

String

Fill color. The default value is #000000. Only SDF images are supported.

collisionSize

No

number($float)

Icon collision size, in pixels. The default value is 1.

Label

Parameter

Mandatory

Type

Description

textField

No

String

Label content, which is obtained from the tile, for example, textField: 'title'.

textSize

No

integer

Font size, in pixels. The value must be greater than 0, and the default value is 16.

offsetX

No

integer

Text offset on the X axis. The default value is 0.

offsetY

No

integer

Text offset on the Y axis. The default value is 0.

color

No

String

Text fill color. The default value is #000000.

textOuterLineSize

No

integer

Text stroke width. The default value is 0.

textOuterLineColor

No

String

Text stroke color. The default value is rgba(0, 0, 0, 0).

LayerFeature

Parameter

Mandatory

Type

Description

dataId

Yes

String

Data ID.

featureId

Yes

String

Feature ID.

layerType

No

String

Vector map layer type. The options are as follows:

  • scatterChart: point layer
  • zoningChart: zoning layer

data

Yes

DataCfg

Tile data compilation rule.

point

No

PointLayer

Point layer.

zoning

No

ZoningLayer

Zoning layer.

PointLayer

Parameter

Mandatory

Type

Description

visible

No

boolean

Indicates whether to display the point layer.

  • true (default): yes
  • false: no

collisionEnabled

No

boolean

Indicates whether to enable text and icon collision.

  • true (default): yes
  • false: no

symbolSortKey

No

String

Feature priority, which is obtained from the tile. The feature with a smaller value will cover that with a larger value. Example: symbolSortKey: 'rank'

multilingualOptions

No

Map

Multi-language settings for a custom map layer. If this parameter is not set, the value of textField in Label will be used for display.

{
localCode: 'zh',
zh: 'zh_name',
en: 'en_name',
fr: 'fr_name',
}

The localCode field is mandatory. Other fields indicate the language name and the attribute field name displayed in the corresponding language.

Display rule: The attribute value is displayed based on the current language. If the current language does not have a corresponding attribute value, the attribute value corresponding to localCode will be displayed.

zIndex

No

integer

Cover relationship. A layer with a larger value will cover that with a smaller value. The default value is 0.

icon

No

Icon

Icon of the point layer.

label

No

Label

Text configuration of the point layer.

Segment

Parameter

Mandatory

Type

Description

field

No

String

Segment field, which is obtained from the tile.

type

No

String

Segment type. The options are single and interval.

styles

No

SegmentStyle[]

Segment style. The fill value of SegmentStyle is the same as that of Segment. However, the strokeLineDash attribute is not supported.

SegmentStyle

Parameter

Mandatory

Type

Description

factor

No

String

Segment value.

  • If type is set to interval, the value is two numbers separated by a comma (,).
  • If type is set to single, the value is a character string.

fill

No

Fill

Fill of a zoning layer. The fill value of SegmentStyle is the same as that of Segment. However, the strokeLineDash attribute is not supported.

ZoningLayer

Parameter

Mandatory

Type

Description

visible

No

boolean

Indicates whether to display the zoning layer.

  • true (default): yes
  • false: no

fillSortKey

No

String

Zoning priority, which is obtained from the tile. A layer with a larger value will cover that with a smaller value. Example: fillSortKey: 'rank'

zIndex

No

integer

Cover relationship. A layer with a larger value will cover that with a smaller value. The default value is 0.

fill

No

Fill

Fill of a zoning layer.

segmentStyle

No

Segment

Segment style of a zoning layer.