请求消息:
- POST https://mapapi.cloud.huawei.com/mapApi/v1/routeService/walkingMatrix?key=API KEY HTTP/1.1
- Content-Type: application/json
- Accept: application/json
- {
- "origins": [
- {"lng": 2.359782, "lat": 48.862544},
- {"lng": 2.358537, "lat": 48.861443}
- ],
- "destinations": [
- {"lng": 2.361702, "lat": 48.860420}
- ],
- "language": "en"
- }
响应消息:
- {
- "originAddresses": [
- "3e Arrondissement, Paris, Ile-de-France, France",
- "3e Arrondissement, Paris, Ile-de-France, France"
- ],
- "returnCode": "0",
- "destinationAddresses": [
- "3e Arrondissement, Paris, Ile-de-France, France"
- ],
- "rows": [
- {
- "cells": [
- {
- "duration": 268,
- "durationText": "4min",
- "distance": 353,
- "distanceText": "353m",
- "status": 0
- }
- ]
- },
- {
- "cells": [
- {
- "duration": 256,
- "durationText": "4min",
- "distance": 352,
- "distanceText": "352m",
- "status": 0
- }
- ]
- }
- ],
- "returnDesc": "OK"
- }
HTTP请求:
POST https://mapapi.cloud.huawei.com/mapApi/v1/routeService/walkingMatrix?key=API KEY
步行矩阵规划请求参数通过JSON Body体的方式进行携带,下面的列表对相关参数进行说明。相关参数类型详细说明请参见“参数说明”章节描述。
参数名称 | 必选(M)/可选(O) | 参数类型 | 参数说明 |
origins | M | 起点的经纬度,不能超过5个。 | |
destinations | M | 终点的经纬度,不能超过5个。 | |
language | O | String(<=6) | 返回结果中对距离和时间描述所使用的语种。目前只支持zh_CN和en |
注:起点和终点的直线距离不能超过100km
参数名称 | 必选(M)/可选(O) | 参数类型 | 参数说明 |
returnCode | M | String | 返回码,具体请参考“返回码”。 |
returnDesc | O | String | 返回值描述。 |
originAddresses | O | String[] | Origins的地址详情。 |
destinationAddresses | O | String[] | Destinations的地址详情。 |
rows | O | Row[] | Origins和Destinations两两进行路径规划后的计算出来的时长和距离,具体参数请参考“参数说明”章节描述。 |
请求消息:
- POST https://mapapi.cloud.huawei.com/mapApi/v1/routeService/bicyclingMatrix?key=API KEY HTTP/1.1
- Content-Type: application/json
- Accept: application/json
- {
- "origins": [
- {"lng": 2.359782, "lat": 48.862544}
- ],
- "destinations": [
- {"lng": 2.361702, "lat": 48.860420}
- ],
- "language": "en"
- }
响应消息:
- {
- "originAddresses": [
- "3e Arrondissement, Paris, Ile-de-France, France"
- ],
- "returnCode": "0",
- "destinationAddresses": [
- "3e Arrondissement, Paris, Ile-de-France, France"
- ],
- "rows": [
- {
- "cells": [
- {
- "duration": 137,
- "durationText": "2min",
- "distance": 353,
- "distanceText": "353m",
- "status": 0
- }
- ]
- }
- ],
- "returnDesc": "OK"
- }
HTTP请求:
POST https://mapapi.cloud.huawei.com/mapApi/v1/routeService/bicyclingMatrix?key=API KEY
骑行矩阵规划请求参数通过JSON Body体的方式进行携带,下面的列表对相关参数进行说明。相关参数类型详细说明请参见“参数说明”章节描述。
参数名称 | 必选(M)/可选(O) | 参数类型 | 参数说明 |
origins | M | 起点的经纬度,不能超过5个。 | |
destinations | M | 终点的经纬度,不能超过5个。 | |
language | O | String(<=6) | 返回结果中对距离和时间描述所使用的语种。目前只支持zh_CN和en |
注:起点和终点的直线距离不能超过100km
参数名称 | 必选(M)/可选(O) | 参数类型 | 参数说明 |
returnCode | M | String | 返回码,具体请参考“返回码”。 |
returnDesc | O | String | 返回值描述。 |
originAddresses | O | String[] | Origins的地址详情。 |
destinationAddresses | O | String[] | Destinations的地址详情。 |
rows | O | Row[] | Origins和Destinations两两进行路径规划后的计算出来的时长和距离,具体参数请参考“参数说明”章节描述。 |
请求消息:
- POST https://mapapi.cloud.huawei.com/mapApi/v1/routeService/drivingMatrix?key=API KEY HTTP/1.1
- Content-Type: application/json
- Accept: application/json
- {
- "origins": [
- {"lng": -1.894679, "lat": 54.974887},
- {"lng": -2.882682, "lat": 54.857616}
- ],
- "destinations": [
- {"lng": -1.744955, "lat": 54.775040}
- ],
- "avoid": [1,2],
- "departAt":1678435530,
- "trafficMode":2,
- "language": "en"
- }
响应消息:
- {
- "originAddresses": [
- "Ovington, Northumberland, England, United Kingdom",
- "Saint Cuthbert Without, Carlisle, Cumbria, England, United Kingdom"
- ],
- "returnCode": "0",
- "destinationAddresses": [
- "Hedleyhope, Durham, England, United Kingdom"
- ],
- "rows": [
- {
- "cells": [
- {
- "duration": 2183,
- "durationText": "36min",
- "distance": 36129,
- "distanceText": "36.1km",
- "status": 0
- }
- ]
- },
- {
- "cells": [
- {
- "duration": 4888,
- "durationText": "1h21min",
- "distance": 104703,
- "distanceText": "104.7km",
- "status": 0
- }
- ]
- }
- ],
- "returnDesc": "OK"
- }
HTTP请求:
POST https://mapapi.cloud.huawei.com/mapApi/v1/routeService/drivingMatrix?key=API KEY
驾车矩阵规划请求参数通过JSON Body体的方式进行携带,下面的列表对相关参数进行说明。相关参数类型详细说明请参见“参数说明”章节描述。
参数名称 | 必选(M)/可选(O) | 参数类型 | 参数说明 |
origins | M | 起点的经纬度,不能超过5个。 | |
destinations | M | 终点的经纬度,不能超过5个。 | |
avoid | O | int[] | 表示计算出的路径应避免所指示的特性,取值包括:
如果不传,默认就是按时间最短返回。 |
departAt | O | long | 预计出发时间。以自UTC 1970年1月1日午夜以来的秒数为单位。 必须是当前或者未来时间,不能是过去时间。 |
trafficMode | O | int | 时间预估模型。取值包括:
|
language | O | String(<=6) | 返回结果中对距离和时间描述所使用的语种。目前只支持zh_CN和en |
注:起点和终点的直线距离不能超过100km
参数名称 | 必选(M)/可选(O) | 参数类型 | 参数说明 |
returnCode | M | String | 返回码,具体请参考“返回码”。 |
returnDesc | O | String | 返回值描述。 |
originAddresses | O | String[] | Origins的地址详情。 |
destinationAddresses | O | String[] | Destinations的地址详情。 |
rows | O | Row[] | Origins和Destinations两两进行路径规划后的计算出来的时长和距离,具体参数请参考“参数说明”章节描述。 |