这里3D场地导航

时间:2018-12-05 03:40:22

标签: here-api

我试图实现“场地导航”,但是当当前操作更新时,我无法让事件监听器捕获事件。

这就是我所做的:

这是我实现的:

1。带有协议功能的NavigationListener接口

class NavigationListener: NSObject,NMAVenue3dNavigationListener{
    func navigationManagerDidReachDestination(_ navigationManager: NMAVenue3dNavigationManager) {
        print("reach destination")
func navigationManager(_ navigationManager: NMAVenue3dNavigationManager, hasCurrentManeuver maneuver: NMAVenue3dRouteManeuver?, nextManeuver: NMAVenue3dRouteManeuver?) {
        print("New Maneuver")      
    }
}
  1. 将侦听器添加到场所导航管理器

    self.venueMapLayer.venueNavigationManager.add(listener: NavigationListener())
    
  2. 创建模拟的位置源并启动导航管理器

    let source = NMAVenue3dSimulatedPositionSource(routeSection:section !, speed:20,畸变Enabled:false)                 source.updatesInterval = 0.1                 NMAPositioningManager.sharedInstance()。dataSource =源      self.venueMapLayer.venueNavigationManager.start(routeSection:section !, inCombinedRoute:CombinedRoute)

0 个答案:

没有答案