Search code examples
iosobjective-cskmapsskobbler-maps

Not able to move map after starting navigation


hi i am using skobbler offline map in my application and everything works fine except one thing, after starting navigation i am able to rotate, zoom in, zoom out in the map but cannot move the map please help solving this. if i set follow user position to NO it works fine but i have to follow user position while in navigation. i had already tried this Not able to move map after starting Navigation SKMAPS but i want follow user position to be YES .please help thanks in advance

[SKRoutingService sharedInstance].navigationDelegate = self;
SKNavigationSettings* navSettings = [SKNavigationSettings navigationSettings];
navSettings.navigationType=SKNavigationTypeReal;
navSettings.distanceFormat=SKDistanceFormatMilesFeet;
[[SKRoutingService sharedInstance]startNavigationWithSettings:navSettings];

self.mapView.settings.followUserPosition = YES;
self.mapView.settings.displayMode = SKMapDisplayMode2D;

Solution

  • I think that these 2 requirements are conflicting:

    • you want to be able to pan the map - this means that you should be able to move where ever you want on the map disregarding the current user position
    • you want to follow the user position - this means that the map should automatically recenter on the user every time the user position is updated

    From my view you can switch between these 2 scenarios (see for example the "Car navigation UI" example in the skobbler/Telenav demo project - there once you start panning the map you go to 2D without following the user position and when you click the "back" button you switch back to 3D navigation following the user position) but you can't have both at the same time (as they are logically exclusive).

    If I'm missing a specific use case let me know