Members
(readonly) distance :number
- Description:
距离。
距离。
Type:
- number
(readonly) steps :array.<LM.Path.Step>
- Description:
路线详细步骤数组。
路线详细步骤数组。
Type:
- array.<LM.Path.Step>
(readonly) type :LM.PathType
- Description:
类型。
类型。
Type:
Methods
constraint(options) → {LM.Path.ConstraintResult}
- Description:
路线约束,将位置点约束到路线上,返回约束结果。
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Returns:
约束结果。
toSegments() → {array.<object>}
- Description:
将路线转换为绘制线标注的数据结构。LM.Line
Returns:
- Type
- array.<object>
Type Definitions
ConstraintResult
- Description:
路线约束结果数据。
Properties:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
position |
object | 约束后的位置。 Properties
|
||||||||||||
distance |
number | 约束后的偏移距离。 |
||||||||||||
step |
LM.Path.Step | 约束位置所在的步骤。 |
||||||||||||
passed |
number | 经过的路程,距离起点的路线上距离。 |
路线约束结果数据。
Type:
- object
Step
- Description:
导航步骤。
Properties:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bearing |
object | 方位。 Properties
|
||||||||||||
sentence |
object | 导航短语。 Properties
|
||||||||||||
floors |
array.<object> | 楼层信息,数组长度等于1时是同层步骤,大于1是跨层步骤。 |
||||||||||||
floors[].level |
number | 楼层级别。 |
||||||||||||
floors[].cname |
string | 中文名称。 |
||||||||||||
floors[].ename |
string | 英文名称。 |
||||||||||||
heading |
number | 方向角,同层有效。 |
||||||||||||
direction |
object | 方向,同层有效。 Properties
|
||||||||||||
road |
object | 道路信息,同层有效。 Properties
|
||||||||||||
distance |
number | 距离,同层有效。 |
||||||||||||
accessMode |
LM.AccessMode | 通行方式,跨层有效。 |
||||||||||||
facility |
object | 设施信息,跨层有效。 Properties
|
||||||||||||
points |
array.<object> | 路线节点坐标数组,当floors大于1时,与floors中的元素一一对应。 |
||||||||||||
points[].x |
array.<object> | X坐标。 |
||||||||||||
points[].y |
array.<object> | Y坐标。 |
导航步骤。
Type:
- object