Reputation: 4247
I successfully made my navigation app using skobbler, but there is one thing I cannot figure out. When the route is calculated and navigation starts, if the user zooms out using pinch gesture on map, it will automatically zoom back to the starting zoom distance.
Is there a way to stop this? I tried digging through the Demo project and Documentation but no luck.
EDIT
As Ando pointed out, I should play with SKNavigationSettings - zoomLevelConfigrations property. But when i was looking through SKNavigationSettings.h file inside the SKMaps.framework, I didn't found the class as it was described in the documentation. There is no zoomLevelConfigurations proprety at all. Instead, this is how it looks like:
// SKNavigationSettings.h
#import < Foundation/Foundation.h>
#import "SKDefinitions.h"
@class SKTrailSettings;
@interface SKNavigationSettings : NSObject
@property(nonatomic, assign) SKDistanceFormat distanceFormat;
@property(nonatomic, assign) float positionerVerticalAlignment;
@property(nonatomic, assign) float positionerHorizontalAlignment;
@property(nonatomic, assign) double speedWarningThresholdInCity;
@property(nonatomic, assign) double speedWarningThresholdOutsideCity;
@property(nonatomic, assign) BOOL enableSplitRoute;
@property(nonatomic, strong) SKTrailSettings *trail;
@property(nonatomic, assign) SKNavigationType navigationType;
@property(nonatomic, assign) BOOL showRealGPSPositions;
@end
So how can I approach zoomLevelConfiguration attribute if it's not in the class ?
Upvotes: 0
Views: 246
Reputation: 3363
Try using the UIPinchGestureRecognizer
and then using the delegate to check if the gesture ended. If it did you just have to reinitialize the compass heading animation. That is how I did it with MapBox SDK. And I don't think it would be very different with skmaps.
Upvotes: 2