Results 1 to 7 of 7

Thread: [iOS 3.0.3] 'Jumping' zoom level while navigating and map in 2D mode

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Erfahrener skobbler
    Join Date
    11.02.2015
    Posts
    123

    [iOS 3.0.3] 'Jumping' zoom level while navigating and map in 2D mode

    Hi,

    I'm setting the zoom level configuration like so:

    Code:
    navSettings = SKNavigationSettings()
    navSettings.zoomLevelConfigurations = getZoomLevelConfig()
    Code:
    func getZoomLevelConfig() -> [Any]? {
            guard UD.autoZoom! != .off else {
                return nil
            }
            let autoZoomFactor = UD.autoZoom!.rawValue
            let zoom1 = SKZoomLevelConfiguration()
            zoom1.speedInterval = SKSpeedInterval(minimumSpeed: 0, maximumSpeed: 15)
            zoom1.zoomLevel = maxZoomLevel
            let zoom2 = SKZoomLevelConfiguration()
            zoom2.speedInterval = SKSpeedInterval(minimumSpeed: 15, maximumSpeed: 35)
            zoom2.zoomLevel = maxZoomLevel - 1*autoZoomFactor
            let zoom3 = SKZoomLevelConfiguration()
            zoom3.speedInterval = SKSpeedInterval(minimumSpeed: 35, maximumSpeed: 70)
            zoom3.zoomLevel = maxZoomLevel - 2*autoZoomFactor
            let zoom4 = SKZoomLevelConfiguration()
            zoom4.speedInterval = SKSpeedInterval(minimumSpeed: 70, maximumSpeed: 110)
            zoom4.zoomLevel = maxZoomLevel - 2.5*autoZoomFactor
            let zoom5 = SKZoomLevelConfiguration()
            zoom5.speedInterval = SKSpeedInterval(minimumSpeed: 110, maximumSpeed: 145)
            zoom5.zoomLevel = maxZoomLevel - 3*autoZoomFactor
            let zoom6 = SKZoomLevelConfiguration()
            zoom6.speedInterval = SKSpeedInterval(minimumSpeed: 145, maximumSpeed: 500)
            zoom6.zoomLevel = maxZoomLevel - 3.5*autoZoomFactor
            return [zoom1, zoom2, zoom3, zoom4, zoom5, zoom6]
        }
    Then I start navigation:
    Code:
    SKRoutingService.sharedInstance().startNavigation(with: navSettings)
    When map is in 2D mode the zoom level 'Jumps' every 10 to 12 seconds or so (speed is constant, tested on simulator 'Freeway Drive'). For example, speed stays within 115-120 km/h (so not crossing any speed interval), the zoom 'jumps' (it zooms in) only to zoom out again (animated) to the level it was before. Btw zoom doesn't work in 3D mode, but that has always been the case.

  2. #2
    Erfahrener skobbler
    Join Date
    11.02.2015
    Posts
    123
    Even when zoom is set to nil it still zooms back after pinch zooming the map.

  3. #3
    Erfahrener skobbler
    Join Date
    12.09.2016
    Posts
    112
    Hi Guido,

    We'll look into it.

    Regards,
    Adrian

  4. #4
    Erfahrener skobbler
    Join Date
    11.02.2015
    Posts
    123
    Thanks Adrian.
    Some additional info: The 'jumping' occurs with:
    Code:
    mapView.settings.headingMode = SKHeadingMode.route
    but not with:
    Code:
    mapView.settings.headingMode = SKHeadingMode.rotatingHeading
    In viewDidLoad of the viewController I'm setting:
    Code:
    mapView.settings.zoomLimits = SKMapZoomLimits(mapZoomLimitMin: kMinimumZoomLimit, mapZoomLimitMax: kMaximumZoomLimit)

  5. #5
    Erfahrener skobbler
    Join Date
    12.09.2016
    Posts
    112
    Hi Guido,

    We couldn't reproduce it. Please try and reproduce this in our demo. Also a video would be helpful for our investigation.

  6. #6
    Erfahrener skobbler
    Join Date
    11.02.2015
    Posts
    123
    Here's a video of the Demo app where it happens twice (around 1:30 and 2:00).


    Steps to reproduce:

    Demo App Adjustments:
    NavigationUIViewController
    Code:
        override func viewDidLoad() {
            super.viewDidLoad()
            
            SKRoutingService.sharedInstance().advisorConfigura  tionSettings = SKAdvisorSettings()
            
            configuration = SKTNavigationConfiguration.default()
            configuration.destination = CLLocationCoordinate2DMake(37.733941, -122.406186)
            
            self.addMapView()
            self.displayAlert()
            self.updateAnnotations()
            
            navigationManager =  SKTNavigationManager(mapView: mapView)
            self.view.addSubview(navigationManager.mainView)
            navigationManager.mainView.isHidden = false
            navigationManager.mainView.isUnderStatusBar = false
            
            let navSettings = SKNavigationSettings()
            navSettings.zoomLevelConfigurations = getZoomLevelConfig()
            navigationManager.navigationSettings = navSettings
            
            navigationManager.startNavigation(with: configuration)
    
        
            navigationManager.mainView.orientation = UIInterfaceOrientationIsLandscape(self.interfaceOr  ientation) ? .landscape : .portrait
            
            self.navigationController!.navigationBar.isTranslu  cent = false
        }
        func getZoomLevelConfig() -> [Any]? {
            let maxZoomLevel: Float = 19.0
            let autoZoomFactor: Float = 2.0
            let zoom1 = SKZoomLevelConfiguration()
            zoom1.speedInterval = SKSpeedInterval(minimumSpeed: 0, maximumSpeed: 15)
            zoom1.zoomLevel = maxZoomLevel
            let zoom2 = SKZoomLevelConfiguration()
            zoom2.speedInterval = SKSpeedInterval(minimumSpeed: 15, maximumSpeed: 35)
            zoom2.zoomLevel = maxZoomLevel - 1*autoZoomFactor
            let zoom3 = SKZoomLevelConfiguration()
            zoom3.speedInterval = SKSpeedInterval(minimumSpeed: 35, maximumSpeed: 70)
            zoom3.zoomLevel = maxZoomLevel - 2*autoZoomFactor
            let zoom4 = SKZoomLevelConfiguration()
            zoom4.speedInterval = SKSpeedInterval(minimumSpeed: 70, maximumSpeed: 110)
            zoom4.zoomLevel = maxZoomLevel - 2.5*autoZoomFactor
            let zoom5 = SKZoomLevelConfiguration()
            zoom5.speedInterval = SKSpeedInterval(minimumSpeed: 110, maximumSpeed: 145)
            zoom5.zoomLevel = maxZoomLevel - 3*autoZoomFactor
            let zoom6 = SKZoomLevelConfiguration()
            zoom6.speedInterval = SKSpeedInterval(minimumSpeed: 145, maximumSpeed: 500)
            zoom6.zoomLevel = maxZoomLevel - 3.5*autoZoomFactor
            return [zoom1, zoom2, zoom3, zoom4, zoom5, zoom6]
        }
    SKTNavigationManager.h
    change line 51 to:
    Code:
    @property (nonatomic, strong) SKNavigationSettings *navigationSettings;
    SKTNavigationManager.m
    comment out line 371:
    Code:
    //_navigationSettings = [SKNavigationSettings navigationSettings];
    Run Demo App in Simulator.

    • Run demo app on Simulator
    • Make sure Simulator location is set to 'Apple'
    • Start Navigation UI
    • tap OK on alert
    • tap 'Start Navigation'
    • If map is in 3D, change it to 2D
    • Set simulator location to 'Freeway Drive'



    The demo app seems to only show this behaviour when rerouting. My app shows it all the time, even during free drive. I've also gotten user feedback about this, so it's not simulator related.

  7. #7
    Erfahrener skobbler
    Join Date
    11.02.2015
    Posts
    123
    This issue seems to have been resolved. Did not get any feedback on it anymore.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •