高德地图 icon

高德地图

高德地图API,位置转换、定位等

Overview

This node integrates with a map service to provide driving route planning functionality. It calculates the optimal driving path between a specified origin and destination, considering various user preferences such as route strategy, waypoints, avoidance areas, and vehicle type. This is useful for applications requiring navigation assistance, logistics planning, or travel itinerary optimization.

Practical examples include:

  • A delivery company planning the fastest or most cost-effective routes for drivers.
  • A ride-sharing app calculating routes that avoid tolls or traffic congestion.
  • Personal trip planners optimizing driving routes with multiple stops or avoiding certain areas.

Properties

Name Meaning
出发点 (origin) Starting point coordinates in "longitude,latitude" format (e.g., 117.500244,40.417801). Coordinates must have up to 6 decimal places. Required.
目的地 (destination) Destination point coordinates in "longitude,latitude" format. Required.
目的地POI ID (driving_destinationid) Optional POI ID of the destination to improve route accuracy when the destination is a known Point of Interest.
目的地POI类别 (driving_destinationtype) Optional category/type of the destination POI if known, to enhance routing precision.
返回结果详略 (extensions) Level of detail in the returned results: "基本信息" (base) or "全部信息" (all). Controls how much data the API returns about the route.
驾车选择策略 (driving_strategy) Driving route selection strategy. Options include speed priority, cost priority, avoiding tolls, avoiding congestion, multi-strategy combinations, and others (20 options total). Default is speed priority.
途经点 (waypoints) Optional intermediate points (up to 40) specified by coordinates to pass through on the route.
避让区域 (avoidpolygons) Optional polygonal areas defined by coordinates to avoid during route calculation.
车牌省份 (driving_province) License plate province abbreviation (in Chinese characters), used to determine traffic restrictions.
车牌号码 (driving_number) License plate number excluding province and punctuation, used for traffic restriction checks.
车辆类型 (drving_cartype) Vehicle type: 普通汽车 (regular car), 纯电动车 (pure electric), 插电混动车 (plug-in hybrid). Default is regular car.
是否使用轮渡 (drving_ferry) Whether to allow ferry usage in the route: 使用渡轮 (allow) or 不使用渡轮 (disallow). Default allows ferries.
是否返回路径聚合信息 (drving_roadaggregation) Boolean flag indicating whether to return aggregated road information in the response.
是否返回Steps字段内容 (drving_nosteps) Whether to return detailed step-by-step directions: 返回Steps (return steps) or 不返回Steps (do not return steps). Default returns steps.

Output

The node outputs JSON data containing the driving route details between the origin and destination. The structure typically includes:

  • Route summary information such as distance, duration, and estimated cost.
  • Detailed path information including turn-by-turn steps (if enabled).
  • Aggregated road data if requested.
  • Information about waypoints and any avoided polygons applied.
  • Additional metadata depending on the level of detail requested ("base" or "all").

No binary data output is indicated.

Dependencies

  • Requires an API key credential for the map service provider.
  • The base URL for API requests is configured via credentials.
  • Network access to the map service's API endpoint is necessary.

Troubleshooting

  • Invalid coordinate format: Ensure longitude and latitude are provided as strings separated by a comma, with no more than 6 decimal places.
  • Missing required fields: Both origin and destination must be provided; otherwise, the request will fail.
  • Incorrect POI IDs or categories: Providing invalid POI IDs or types may reduce route accuracy but should not cause errors.
  • Strategy conflicts: Selecting incompatible driving strategies might result in unexpected routes; verify the chosen strategy matches your needs.
  • API authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Exceeding waypoint limits: Maximum of 40 waypoints allowed; exceeding this may cause errors.
  • Avoid polygons format: Ensure polygons are properly formatted as coordinate strings separated by commas and joined by pipes.

Links and References

Discussion