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

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
stepsboolean否Whether to return steps and turn-by-turn instructions.—
layersstring否Influences the layer of road from which a route starts from a waypoint.—
excludestring否Exclude certain road types and custom locations from routing.—
includestring否Include certain additional road types for routing.—
profileenum (mapbox/driving-traffic | mapbox/driving | mapbox/walking | mapbox/cycling)是The routing profile to use for calculating directions.—
bearingsstring否Influences the direction in which a route starts from a waypoint. Format: {angle,degrees} per waypoint.—
languagestring否The language of returned turn-by-turn text instructions.—
overviewenum (full | simplified | false)否Displays the requested type of overview geometry.—
radiusesstring否The maximum distance a coordinate can be moved to snap to the road network, in meters.—
arrive_bystring否The desired arrival time in ISO 8601 format (mapbox/driving profile only).—
depart_atstring否The departure time in ISO 8601 format (mapbox/driving and mapbox/driving-traffic profiles).—
max_widthnumber否The max vehicle width in meters.—
waypointsstring否A semicolon-separated list indicating which input coordinates should be treated as waypoints.—
alley_biasnumber否A scale from -1 to 1 biasing route toward or against alleys (mapbox/driving profile only).—
approachesstring否A semicolon-separated list indicating the side of the road from which to approach waypoints.—
geometriesenum (geojson | polyline | polyline6)否The format of the returned geometry.—
max_heightnumber否The max vehicle height in meters.—
max_weightnumber否The max vehicle weight in metric tons.—
annotationsstring否Return additional metadata along the route. Must be used in conjunction with overview=full.—
coordinatesstring是A semicolon-separated list of between two and 25 {longitude},{latitude} coordinate pairs to visit in order.—
voice_unitsenum (imperial | british_imperial | metric)否Specify which type of units to return in voice instructions.—
alternativesboolean否Whether to try to return alternative routes (true) or not (false, default). Up to two alternatives may be returned.—
walkway_biasnumber否A scale from -1 to 1 biasing route toward or against walkways (mapbox/walking profile only).—
notificationsenum (all | none)否Returns notification metadata associated with the route leg.—
walking_speednumber否The walking speed in meters per second (mapbox/walking profile only).—
waypoint_namesstring否A semicolon-separated list of custom names for entries in the coordinates list.—
roundabout_exitsboolean否Whether to emit instructions at roundabout exits. Must be used with steps=true.—
waypoint_targetsstring否A semicolon-separated list of coordinate pairs used to specify drop-off locations.—
continue_straightboolean否Sets the allowed direction of travel when departing intermediate waypoints.—
voice_instructionsboolean否Whether to return SSML marked-up text for voice guidance. Must be used with steps=true.—
banner_instructionsboolean否Whether to return banner objects associated with the route steps. Must be used with steps=true.—
waypoints_per_routeboolean否If true, the waypoints array is returned within the route object.—
avoid_maneuver_radiusinteger否Add a radius around the starting point in which the API will avoid returning any significant maneuvers. Range: 1-1000 meters.—
snapping_include_closuresstring否A semicolon-separated list of boolean values affecting snapping to road segments with live-traffic closures (mapbox/driving-traffic only).—
snapping_include_static_closuresstring否A semicolon-separated list of boolean values affecting snapping to statically closed road segments (mapbox/driving-traffic only).—