Actions16
Overview
This node integrates with a map service API to perform distance measurement within the "路径规划" (Route Planning) resource. Specifically, the "距离测量" (Distance Measurement) operation calculates distances between multiple origin points and a single destination point. It supports different methods of distance calculation, such as straight-line distance or driving navigation distance.
Common scenarios where this node is useful include:
- Calculating travel distances for logistics or delivery route optimization.
- Estimating distances between multiple customer locations and a warehouse.
- Measuring direct geographic distances for proximity analysis.
Practical example:
- A delivery company wants to measure driving distances from several warehouses (origins) to a customer's address (destination) to decide which warehouse should fulfill the order.
Properties
| Name | Meaning |
|---|---|
| 出发点 (origins) | Multiple origin coordinates specified as latitude and longitude pairs separated by commas. Up to 40 origin points can be provided. Example format: "117.500244,40.417801". |
| 目的地 (destination) | Single destination coordinate in longitude,latitude format, e.g., "117.500244,40.417801". Required field. |
| 距离计算的方式 (distance_type) | Method of distance calculation: - 0: Straight line distance- 1: Driving navigation distance (only supports domestic coordinates) |
Output
The node outputs JSON data containing the calculated distances between each origin and the destination. The exact structure depends on the underlying API response but typically includes:
- Distance values (in meters or kilometers).
- Possibly duration estimates if driving navigation distance is selected.
- Additional metadata about the route or measurement method.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for the map service provider.
- The base URL for API requests must be configured in the node credentials.
- Network access to the map service API endpoint.
Troubleshooting
- Invalid coordinate format: Ensure that all coordinates are correctly formatted as
"longitude,latitude"with decimal points not exceeding six digits. - Missing required fields: The destination coordinate is mandatory; missing it will cause errors.
- API quota limits: Exceeding the allowed number of requests or origins may result in errors or throttling.
- Unsupported distance type: Using driving navigation distance outside supported regions may fail.
- Incorrect API key or permissions: Authentication failures will prevent successful API calls.
Links and References
- Map Service API Documentation (official distance measurement API guide)
- Coordinate Format Standards