目录

Parameters

Address

Parameter

Mandatory

Type

Description

countryCode

No

String

Country code.

country

No

String

Country name.

state

No

String

Province/State.

county

No

String

City/County.

town

No

String

Town/District.

settlement

No

String

Settlement place.

AddressDetail

Parameter

Mandatory

Type

Description

countryCode

No

String

Country code, which complies with the ISO 3166-1 alpha-2 standard.

country

No

String

Country name.

adminArea

No

String

Level-1 administrative region in a country, which is generally a province or state.

subAdminArea

No

String

Level-2 administrative region in a country, which is generally a city.

locality

No

String

City.

subLocality

No

String

Level-4 administrative region in a country, which is generally a town.

streetNumber

No

String

Street number.

thoroughfare

No

String

Street name.

postalCode

No

String

Postal code.

AutocompletePrediction

Parameter

Mandatory

Type

Description

description

Yes

String

Description of a predicted place.

matchedKeywords

Yes

Array<Word>

Matching position of the entered keyword in the description.

matchedWords

Yes

Array<Word>

Words and their positions in the description.

Coordinate

Parameter

Mandatory

Type

Description

lat

Yes

Number

Latitude. The value ranges from -90 to 90.

lng

Yes

Number

Longitude. The value ranges from -180 to 180.

CoordinateBounds

Parameter

Mandatory

Type

Description

northeast

Yes

Coordinate

Coordinates of the northeast corner.

southwest

Yes

Coordinate

Coordinates of the southwest corner.

FitViewOptions

Parameter

Mandatory

Type

Description

padding

No

Array<Number>

Margins, in the order of top, bottom, left, and right.

maxZoom

No

Number

Maximum zoom level of a map. The value ranges from 2 to 20.

GroundOverlayLatLngBounds

Parameter

Mandatory

Type

Description

east

Yes

Number

Longitude of the northeast corner. The value range is [-180, 180].

west

Yes

Number

Longitude of the southwest corner. The value range is [-180, 180].

north

Yes

Number

Latitude of the northeast corner. The value range is [-90, 90].

south

Yes

Number

Latitude of the southwest corner. The value range is [-90, 90].

LatLng

Parameter

Mandatory

Type

Description

lat

Yes

Number

Latitude. The value ranges from -90 to 90.

lng

Yes

Number

Longitude. The value ranges from -180 to 180.

LatLngBounds

Parameter

Mandatory

Type

Description

ne

Yes

Coordinate

Coordinates of the northeast corner.

sw

Yes

Coordinate

Coordinates of the southwest corner.

NaviLineCodes

Parameter

Mandatory

Type

Description

codes

No

Array<Object>

Road sign content and sprite image of each line segment. If this parameter is not set, the road sign will not be displayed.

Example: [{code: 'code2',codeSprite: '110033'}, ...]

The value length is half that of indexes.

indexes

No

Array

Subscript indexes of points on each line segment. If this parameter is not set, the road sign will not be displayed.

Example: [0, 50,120,180]

The length of indexes is an even number, and every two indexes form a pair.

NaviLineFillColors

Parameter

Mandatory

Type

Description

colors

No

Array

Color of each line segment. If this parameter is not set, the default color will be used.

Example: ['#ff0000', 'rgb(255, 0, 0)' ...]

The value length is half of that of indexes.

indexes

No

Array

Subscript indexes of points on each line segment.

Example: [0, 50, 120, 180, ...]

The length of indexes is an even number, and every two indexes form a pair.

NaviLineTexts

Parameter

Mandatory

Type

Description

texts

No

Array<Object>

Road name of each line segment. If this parameter is not set, the road name will not be displayed.

Example: [{name: 'Chang'an Street',name_da:'changanjie'}, ...]

In the example, the first name indicates the road name in the local language, and the second name indicates the road name in the set language. The attribute is named in name_{set language code} format.

The array length is half of that of indexes.

indexes

No

Array

Subscript indexes of points on each line segment. If this parameter is not set, the road name will not be displayed.

Example: [0, 50, 120, 180, ...]

The length of indexes is an even number, and every two indexes form a pair.

OpeningHours

Parameter

Mandatory

Type

Description

texts

Yes

Array<String>

Description of weekly opening hours of a place.

periods

Yes

Array<Period>

Opening hours of a place.

Path

Parameter

Mandatory

Type

Description

steps

Yes

Array<Step>

Route section information.

distance

No

Number

Route distance, in meters.

duration

No

Number

Journey time, in seconds.

distanceText

No

String

Distance description.

durationInTraffic

No

Number

Journey time calculated based on the real-time traffic condition, in seconds.

durationText

No

String

Journey time description.

startLocation

Yes

Coordinate

Longitude and latitude of the departure place.

startAddress

No

String

Departure place details.

endLocation

Yes

Coordinate

Longitude and latitude of the destination.

endAddress

No

String

Destination details.

Period

Parameter

Mandatory

Type

Description

open

Yes

TimeOfWeek

Open time.

close

No

TimeOfWeek

Close time.

Poi

Parameter

Mandatory

Type

Description

poiTypes

Yes

Array<String>

List of POI types.

hwPoiTypes

Yes

Array<String>

Huawei POI classification system.

NOTE:

hwPoiTypes is recommended.

phone

No

String

Phone number.

internationalPhone

No

String

International phone number.

rating

No

Number

Rating.

websiteUrl

No

String

Website URL.

openingHours

No

OpeningHours

Opening hours.

photoUrls

No

Array<String>

Photo URL.

priceLevel

No

Number

Price level. The value ranges from 0 to 4.

NOTE:

Only the Place Details Search API returns this parameter.

businessStatus

No

String

Business status of a place. The options are as follows:

  • OPEN_NOW: open
  • CLOSE_NOW: closed
  • CLOSED_TEMPORARILY: temporarily closed
  • CLOSED_PERMANENTLY: permanently closed
NOTE:

Only the Place Details Search API returns this parameter.

icon

No

String

Icon of a POI.

QuantityUrls

Parameter

Mandatory

Type

Description

num

Yes

Number

Number of markers to be clustered.

url

Yes

String

Icon address, which can be the image URL or file path. By default, a built-in image is provided.

Route

Parameter

Mandatory

Type

Description

Value

paths

Yes

Array<Path>

Planned routes.

-

optimizedWaypoints

No

Array<Number>

Optimized waypoint index. This parameter is available only when viaType is set to false and optimize is set to true.

-

bounds

No

CoordinateBounds

Route bounds.

-

hasRestrictedRoad

No

Number

Indicates whether the route includes private or restricted roads.

The options are as follows:

  • 0: no
  • 1: yes

dstInRestrictedArea

No

Number

Indicates whether the destination is in a restricted area.

crossCountry

No

Number

Indicates whether the route crosses a country boundary. (Learn about the COVID-19 restriction policies before departure.)

crossMultiCountries

No

Number

Indicates whether the route crosses multiple country boundaries.

hasRoughRoad

No

Number

Indicates whether the route includes rough roads.

dstInDiffTimeZone

No

Number

Indicates whether the time zone of the destination is different from that of the departure place.

hasFerry

No

Number

Indicates whether the route includes ferry.

hasTrafficLight

No

Number

Indicates whether the route includes traffic lights.

hasTolls

No

Number

Indicates whether the route includes toll gates.

trafficLightNum

No

Number

Number of traffic lights.

-

overviewPolyline

No

String

Encoded polyline of the route.

-

Site

Parameter

Mandatory

Type

Description

siteId

Yes

String

Unique ID of a place.

name

No

String

Name of a place.

formatAddress

Yes

String

Formatted detailed address of a place.

address

Yes

AddressDetail

Place details.

location

No

Coordinate

Longitude and latitude of a place.

viewport

No

CoordinateBounds

Viewport of a place.

NOTE:

This parameter is not supported for the search suggestion API.

distance

No

Number

Linear distance between a predicted place and the location specified by the input parameter location, in meters.

NOTE:

Currently, this parameter is supported only for the keyword search, nearby place search, and search suggestion APIs.

poi

No

Poi

POI information about a place if the place is a POI.

utcOffset

No

Number

Difference between the time zone of a place and the UTC time zone, in minutes.

NOTE:

This parameter is returned only by the place detail search API.

prediction

No

AutocompletePrediction

Description of the autocomplete place. This parameter is returned only by the search suggestion and autocomplete APIs.

Step

Parameter

Mandatory

Type

Description

distance

No

Number

Route distance, in meters.

distanceText

No

String

Distance description.

durationInTraffic

No

Number

Journey time calculated based on the real-time traffic condition, in seconds.

durationText

No

String

Journey time description.

startLocation

No

Coordinate

Longitude and latitude of the departure place.

startAddress

No

String

Departure place details.

endLocation

No

Coordinate

Longitude and latitude of the destination.

endAddress

No

String

Destination details.

action

No

String

Operation to be performed in the current step. The options are as follows:

  • TURN_SLIGHT_LEFT
  • TURN_SHARP_LEFT
  • UTURN_LEFT
  • TURN_LEFT
  • TURN_SLIGHT_RIGHT
  • TURN_SHARP_RIGHT
  • UTURN_RIGHT
  • TURN_RIGHT
  • STRAIGHT
  • RAMP_LEFT
  • RAMP_RIGHT
  • MERGE
  • FORK_LEFT
  • FORK_RIGHT
  • FERRY (not supported currently)
  • FERRY_TRAIN (not supported currently)
  • ROUNDABOUT_LEFT
  • ROUNDABOUT_RIGHT

polyline

No

Array<Coordinate>

A series of coordinates of a road section (including coordinates of the departure place and destination).

roadName

No

String

Road name.

orientation

No

Number

Road direction. The options are as follows:

  • 0: bidirectional
  • 1: forward direction
  • 2: reverse direction

instruction

No

String

Text instruction.

TimeOfWeek

Parameter

Mandatory

Type

Description

week

Yes

Number

  • 0: Sunday
  • 1: Monday
  • 2: Tuesday
  • 3: Wednesday
  • 4: Thursday
  • 5: Friday
  • 6: Saturday

time

Yes

String

24-hour time in hhmm format.

Word

Parameter

Mandatory

Type

Description

offset

Yes

Number

Offset of a word in the description.

value

Yes

Number

Word.