public class DrivingParam extends RoutePlanningParam
Modifier and Type | Class and Description |
---|---|
static class |
DrivingParam.Policy
驾车路径规划的策略类型
|
static class |
DrivingParam.Preference
驾车路径规划的单项偏好参数
|
static class |
DrivingParam.RoadType |
static class |
DrivingParam.Travel
轨迹
|
RoutePlanningParam.DrivingPolicy, RoutePlanningParam.TransitPolicy
Constructor and Description |
---|
DrivingParam() |
DrivingParam(LatLng from,
LatLng to) |
Modifier and Type | Method and Description |
---|---|
DrivingParam |
accuracy(int accuracy)
[from辅助参数]定位精度,单位:米,取 > 0数值,默认5。 当定位精度 > 30米时heading参数将被忽略
|
DrivingParam |
addWayPoint(LatLng l)
增加一个途经点,最多10个,如果多余10则不作任何操作。
|
DrivingParam |
addWayPoints(java.lang.Iterable<LatLng> ls)
增加多个途经点
|
RequestParams |
buildParameters()
构造参数
|
DrivingParam |
fromPOI(java.lang.String fromPOI)
起点POI ID,传入后,优先级高于from(坐标)
|
DrivingParam |
fromTravel(DrivingParam.Travel travel)
起点轨迹:
在真实的场景中,易受各种环境及设备精度影响,导致定位点产生误差,传入起点前段轨迹,可有效提升准确度。
优先级:高于from参数
|
java.lang.Class<DrivingResultObject> |
getResultClass() |
java.lang.String |
getUrl() |
DrivingParam |
heading(int heading)
[from辅助参数]在起点位置时的车头方向,数值型,取值范围0至360(0度代表正北,顺时针一周360度)
传入车头方向,对于车辆所在道路的判断非常重要,直接影响路线计算的效果
|
DrivingParam |
policy(DrivingParam.Policy policy,
DrivingParam.Preference... preferences)
设置驾车规划策略
|
DrivingParam |
policy(RoutePlanningParam.DrivingPolicy policy)
Deprecated.
|
DrivingParam |
roadType(DrivingParam.RoadType roadType)
[from辅助参数] 起点道路类型,可选值请使用
DrivingParam.RoadType |
DrivingParam |
setCarNumber(java.lang.String carNumber)
车牌号,填入后,路线引擎会根据车牌对限行区域进行避让,不填则不不考虑限行问题
|
void |
setMultyPlan(boolean isMultyPlan)
Deprecated.
已废弃
|
DrivingParam |
speed(int speed)
[from辅助参数]速度,单位:米/秒,默认3。 当速度低于1.39米/秒时,heading将被忽略
|
DrivingParam |
toPOI(java.lang.String toPOI)
终点POI ID(可通过腾讯位置服务地点搜索服务得到),当目的地为较大园区、小区时,会以引导点做为终点(如出入口等),体验更优。
该参数优先级高于to(坐标),但是当目的地无引导点数据或POI ID失效时,仍会使用to(坐标)作为终点
|
checkParams, from, locationToParamsString, to
public DrivingParam fromTravel(DrivingParam.Travel travel)
travel
- public DrivingParam fromPOI(java.lang.String fromPOI)
fromPOI
- public DrivingParam toPOI(java.lang.String toPOI)
toPOI
- public DrivingParam heading(int heading)
heading
- public DrivingParam speed(int speed)
speed
- public DrivingParam accuracy(int accuracy)
accuracy
- public DrivingParam roadType(DrivingParam.RoadType roadType)
DrivingParam.RoadType
roadType
- 道路类型public void setMultyPlan(boolean isMultyPlan)
isMultyPlan
- public DrivingParam policy(DrivingParam.Policy policy, DrivingParam.Preference... preferences)
policy
- preferences
- public DrivingParam policy(RoutePlanningParam.DrivingPolicy policy)
policy(Policy, Preference...)
policy
- public DrivingParam addWayPoint(LatLng l)
l
- public DrivingParam addWayPoints(java.lang.Iterable<LatLng> ls)
ls
- public DrivingParam setCarNumber(java.lang.String carNumber)
carNumber
- public RequestParams buildParameters()
ParamObject
buildParameters
in interface ParamObject
buildParameters
in class RoutePlanningParam
public java.lang.String getUrl()
getUrl
in class RoutePlanningParam
public java.lang.Class<DrivingResultObject> getResultClass()
getResultClass
in class RoutePlanningParam