Mutation
创建匹配路线
使用 createMatchedRoute 变更根据一系列 GPS 点创建路线。当您已经根据自己的业务规则拥有一条路线,并希望在其基础上添加充电停靠点并计算能耗时,此操作最为有用。
变更
创建匹配路线需要 vehicle 和至少两个按时间顺序排列的 points。您还可以添加 via 点、departure_time、weather、driving_preferences、operators 或 alternative_station_radius 来优化计算。设置 plan_charging_stops 后,当车辆的电量状态在路线上任意位置达到阈值时,将查找并规划充电停靠点。该变更会返回匹配路线的 id,可用于获取路线详情或订阅更新。
参数
input· CreateMatchedRouteInput· required字段
ID· ID操作可能会失败。请考虑以下错误场景以正确处理。有关错误的更多信息 here.
invalid_coordinates- Coordinates provided for $LOCATION are not valid.
matched_route_minimum_point_count- input.points[] must contain at least 2 points.
matched_route_via_index_above_allowed- The via index $INDEX is above the allowed range. The maximum allowed index is NaN.
matched_route_via_index_first_or_last_point_not_allowed- The first and last points in the route cannot be defined as via points.
negative_value_not_allowed- Negative value for $LOCATION is not allowed.
此内容是否有帮助?