Search code examples
here-api

How to enable the RealisticView events in HERE iOS Premium SDK 3.18+


Using the HERE iOS Premium SDK 3.18 to create a routing App and I can't figure out what is needed in order to enable the Realistic View events in order to get signpost data for maneuvers in the route.

I have specified the NavigationManager Delegate and created functions for the event callbacks. When I create a route and run a simulation on the route, I never receive either of the realistic view events. I have scoured the User Guide and the API Reference but can't get the events.

    func navigationManager(_ navigationManager: NMANavigationManager, didUpdateRealisticViewsForNextManeuver realisticViews: [NSNumber : [String : NMAImage]]) {
        mapState.status = "Realistic View Updated for Next Maneuver!"
    }
    
    func navigationManager(_ navigationManager: NMANavigationManager, didUpdateRealisticViewsForCurrentManeuver realisticViews: [NSNumber : [String : NMAImage]]) {
        print("RealisticViews: \(realisticViews.count)")
        for key in realisticViews.keys  {
            print("key: \(key)")
        }
        
      
        mapState.status = "Realistic View Updated for Current Maneuver!"
    }

====== Update: I located my problem, I was missing the step to register the realisticview aspect ratios after doing that I started receiving the events. From the User Guide:

"The Realistic View feature is disabled by default. To enable it, use NMANavigationManager.realisticViewMode property and set the view mode to NMARealisticViewDay or NMARealisticViewNight. Next, register the desired image aspect ratios by using NMANavigationManager.realisticViewAspectRatios property."


Solution

  • ====== Update: I located my problem, I was missing the step to register the realisticview aspect ratios after doing that I started receiving the events. From the User Guide:

    "The Realistic View feature is disabled by default. To enable it, use NMANavigationManager.realisticViewMode property and set the view mode to NMARealisticViewDay or NMARealisticViewNight. Next, register the desired image aspect ratios by using NMANavigationManager.realisticViewAspectRatios property."