摘要
表示路径的单条边。
说明
可通过 DirectionsQuery 类获取此对象,无法进行创建。 典型路径为边和交汇点的交替序列,例如 RouteJunction -> RouteEdge -> RouteJunction -> RouteEdge -> RouteJunction。
TraversedEdge 类继承自 TraversedElement 类,因此,TraversedElement 类的所有属性也可以通过 TraversedEdge 类访问。
属性
| 属性 | 说明 | 数据类型 |
| administrativeArea (只读) | 边所在行政区域的名称。 | String |
| arrivalTime (只读) | 边开始时的时间 (UTC)。 | DateTime |
| departureTime (只读) | 边结束时的时间 (UTC)。 | DateTime |
| directionPoints (可读写) | 与边相关联的方向点。 | DirectionPoint |
| drivingSide (只读) | 驾驶侧值。 | DrivingSide |
| element (只读) | 网络边元素。 | Edge |
| floorName (只读) | 边所在楼层的名称。 | String |
| fromLevel (只读) | 边的起始级别。 | Integer |
| fromPosition (只读) | 网络元素上路径边开始的位置。 值的范围为 0.0 到 1.0。 | Float |
| generalizedAzimuths (只读) | 根据边的起点和终点计算的广义方位角比 immediateAzimuths 属性值更远。 | Object |
| immediateAzimuths (只读) | 在邻近边的起点和终点处计算的方位角。 该元组包含浮点值。 | tuple |
| names (只读) | 边名称的迭代。 | DirectionsName |
| referenceLandmarks (只读) | 与边相关的参考地标的迭代。 | ReferenceLandmark |
| spatialLandmarks (只读) | 与边相关的空间地标的迭代。 | SpatialLandmark |
| timezoneID (只读) | 边所在时区的 ID。 | Integer |
| toLevel (只读) | 边的结束级别。 | Integer |
| toPostition (只读) | 网络元素上路径边结束的位置。 值的范围为 0.0 到 1.0。 | Float |
方法概述
| 方法 | 说明 |
| getName (index, mapping, fallback) | 获取边的名称。 可以返回全名或名称的一部分,具体取决于 mapping 参数值。 |
| getNames (mapping, fallback) | 获取边的名称。 |
方法
getName (index, mapping, fallback)
| 参数 | 说明 | 数据类型 |
index | The type of name that will be retrieved (for example, PrimaryName = 0, AlternateName1 = 1, AlternateName2 = 2, and so on depending on the network dataset’s direction configuration). (默认值为 0) | Integer |
mapping | The portion of the name that will be returned. (默认值为 DirectionsFieldMapping.FullName) | DirectionsFieldMapping |
fallback | The value if the edge does not contain the requested mapped property. (默认值为 "") | String |
| 数据类型 | 说明 |
| String | 来自边的名称。None 也是有效的返回值。 |
getNames (mapping, fallback)
| 参数 | 说明 | 数据类型 |
mapping | The portion of the name that will be returned. (默认值为 DirectionsFieldMapping.FullName) | DirectionsFieldMapping |
fallback | The value if the edge does not contain the requested mapped property. (默认值为 "") | String |
| 数据类型 | 说明 |
| Iterable | 字符串的迭代,由边的名称(主要名称和备选名称)组成。 “None”也是一个可能的返回值。 |