Mapbox Nav Directions Get Directions
1.6积分/次
ae_mapbox_nav_directions_get_directions
获取驾车、步行、骑行或电动汽车的逐向导航指引及最优路线。
1.6积分/次
价格说明
1.6积分/次
| 条件 | 费用 |
|---|---|
| 每次调用 | 1.6积分/次 |
API 调用
通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。
cURL
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_mapbox_nav_directions_get_directions' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"profile": "mapbox/driving",
"coordinates": "xxx"
}
}'- 请求方式
- POST
- 接口地址
- /agent-api/v1/tool/execute
- 鉴权方式
- X-Api-Key
- 超时时间
- 60 秒
响应示例
{
"error_no": 0,
"error_msg": "",
"result": [
{
"type": "text",
"text": "xxx"
}
],
"platform_annotations": {
"source": "AgentEarth",
"platform_note": "xxx",
"platform_suggestion": "xxx"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
steps | boolean | 否 | Whether to return steps and turn-by-turn instructions. | — |
layers | string | 否 | Influences the layer of road from which a route starts from a waypoint. | — |
exclude | string | 否 | Exclude certain road types and custom locations from routing. | — |
include | string | 否 | Include certain additional road types for routing. | — |
profile | enum (mapbox/driving-traffic | mapbox/driving | mapbox/walking | mapbox/cycling) | 是 | The routing profile to use for calculating directions. | — |
bearings | string | 否 | Influences the direction in which a route starts from a waypoint. Format: {angle,degrees} per waypoint. | — |
language | string | 否 | The language of returned turn-by-turn text instructions. | — |
overview | enum (full | simplified | false) | 否 | Displays the requested type of overview geometry. | — |
radiuses | string | 否 | The maximum distance a coordinate can be moved to snap to the road network, in meters. | — |
arrive_by | string | 否 | The desired arrival time in ISO 8601 format (mapbox/driving profile only). | — |
depart_at | string | 否 | The departure time in ISO 8601 format (mapbox/driving and mapbox/driving-traffic profiles). | — |
max_width | number | 否 | The max vehicle width in meters. | — |
waypoints | string | 否 | A semicolon-separated list indicating which input coordinates should be treated as waypoints. | — |
alley_bias | number | 否 | A scale from -1 to 1 biasing route toward or against alleys (mapbox/driving profile only). | — |
approaches | string | 否 | A semicolon-separated list indicating the side of the road from which to approach waypoints. | — |
geometries | enum (geojson | polyline | polyline6) | 否 | The format of the returned geometry. | — |
max_height | number | 否 | The max vehicle height in meters. | — |
max_weight | number | 否 | The max vehicle weight in metric tons. | — |
annotations | string | 否 | Return additional metadata along the route. Must be used in conjunction with overview=full. | — |
coordinates | string | 是 | A semicolon-separated list of between two and 25 {longitude},{latitude} coordinate pairs to visit in order. | — |
voice_units | enum (imperial | british_imperial | metric) | 否 | Specify which type of units to return in voice instructions. | — |
alternatives | boolean | 否 | Whether to try to return alternative routes (true) or not (false, default). Up to two alternatives may be returned. | — |
walkway_bias | number | 否 | A scale from -1 to 1 biasing route toward or against walkways (mapbox/walking profile only). | — |
notifications | enum (all | none) | 否 | Returns notification metadata associated with the route leg. | — |
walking_speed | number | 否 | The walking speed in meters per second (mapbox/walking profile only). | — |
waypoint_names | string | 否 | A semicolon-separated list of custom names for entries in the coordinates list. | — |
roundabout_exits | boolean | 否 | Whether to emit instructions at roundabout exits. Must be used with steps=true. | — |
waypoint_targets | string | 否 | A semicolon-separated list of coordinate pairs used to specify drop-off locations. | — |
continue_straight | boolean | 否 | Sets the allowed direction of travel when departing intermediate waypoints. | — |
voice_instructions | boolean | 否 | Whether to return SSML marked-up text for voice guidance. Must be used with steps=true. | — |
banner_instructions | boolean | 否 | Whether to return banner objects associated with the route steps. Must be used with steps=true. | — |
waypoints_per_route | boolean | 否 | If true, the waypoints array is returned within the route object. | — |
avoid_maneuver_radius | integer | 否 | Add a radius around the starting point in which the API will avoid returning any significant maneuvers. Range: 1-1000 meters. | — |
snapping_include_closures | string | 否 | A semicolon-separated list of boolean values affecting snapping to road segments with live-traffic closures (mapbox/driving-traffic only). | — |
snapping_include_static_closures | string | 否 | A semicolon-separated list of boolean values affecting snapping to statically closed road segments (mapbox/driving-traffic only). | — |


