概览
包含有关导航状态的信息。
公共成员函数 | |
(NSTimeInterval) | - roundedTime: |
返回时间四舍五入到最接近的分钟数,最短一分钟。 | |
(NSMeasurement< NSUnitLength * > *) | - roundedDistance: |
返回表示指定距离的舍入测量值,考虑用户偏好设置和路线的建议距离单位。 | |
(NSArray< NSAttributedString * > *) | - instructionsForStep:options: |
特定步骤的格式化说明。 | |
属性 | |
GMSNavigationNavState | navState |
用于导航的当前 GMSNavigationNavState 。 | |
GMSNavigationStepInfo * | currentStep |
有关后续操作步骤的信息。 | |
NSArray< GMSNavigationStepInfo * > * | remainingSteps |
当前步骤之后的剩余步骤。 | |
BOOL | routeChanged |
自上次发送消息以来,路线是否发生过更改。 | |
NSTimeInterval | timeToCurrentStepSeconds |
沿途到当前路段的预计剩余时间(以秒为单位)。 | |
CLLocationDistance | distanceToCurrentStepMeters |
沿路线到当前路段的估算剩余距离(以米为单位)。 | |
NSTimeInterval | timeToFinalDestinationSeconds |
到达最终目的地的预计剩余时间(以秒为单位)。 | |
CLLocationDistance | distanceToFinalDestinationMeters |
距最终目的地的估算剩余距离(以米为单位)。 |
成员函数文档
- (NSTimeInterval) roundedTime: | (NSTimeInterval) | timeSeconds |
返回时间四舍五入到最接近的分钟数,最短一分钟。
这在向用户显示路线信息时非常有用,因为显示“0 分钟”之类的时间可能会让人感到困惑。
由于上述原因,此方法的输入值应始终为正。
- (NSMeasurement<NSUnitLength *> *) roundedDistance: | (CLLocationDistance) | distanceMeters |
返回表示指定距离的舍入测量值,考虑用户偏好设置和路线的建议距离单位。
- (NSArray<NSAttributedString *> *) descriptionForStep: | (GMSNavigationStepInfo *) | stepInfo | |
选项: | (GMSNavigationInstructionOptions *) | 选项 | |
特定步骤的格式化说明。
属性说明
- (GMSNavigationNavState) navState [read, assign] |
用于导航的当前 GMSNavigationNavState
。
- (GMSNavigationStepInfo*) currentStep [read, assign] |
有关后续操作步骤的信息。
仅当 navState 为 GMSNavigationNavStateEnroute 时才会设置,否则为 null。
- (NSArray<GMSNavigationStepInfo *>*) remainingSteps [read, assign] |
当前步骤之后的剩余步骤。
- (BOOL) routeChanged [read, assign] |
自上次发送消息以来,路线是否发生过更改。
导致路线变更的原因可能包括:重设路线、添加/移除航点、用户选择或驾车前往备选路线,或路况更新。
- (NSTimeInterval)timeToCurrentStepSecondstimeToCurrentStepSeconds [read, assign] |
沿途到当前路段的预计剩余时间(以秒为单位)。
- (CLLocationDistance) distanceToCurrentStepMeters [read, assign] |
沿路线到当前路段的估算剩余距离(以米为单位)。
- (NSTimeInterval)timeToFinalDestinationSecondstimeToFinalDestinationSeconds [read, assign] |
到达最终目的地的预计剩余时间(以秒为单位)。
- (CLLocationDistance) distanceToFinalDestinationMeters [read, assign] |
距最终目的地的估算剩余距离(以米为单位)。