FollowPositionPreferencesContext

Objective-C


@interface FollowPositionPreferencesContext : NSObject

Swift

class FollowPositionPreferencesContext : NSObject

An object that manages map view follow position preferences.

  • Initializes and returns a newly allocated object using the model data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModelData:(nonnull void *)data;
  • Set the time interval before starting a turn presentation.

    Declaration

    Objective-C

    - (void)setTimeBeforeTurnPresentation:(int)value;

    Swift

    func setTimeBeforeTurnPresentation(_ value: Int32)

    Parameters

    value

    The time interval in seconds. -1 means using SDK default value.

  • Get the time interval before starting a turn presentation.

    Declaration

    Objective-C

    - (int)getTimeBeforeTurnPresentation;

    Swift

    func getTimeBeforeTurnPresentation() -> Int32

    Return Value

    The time interval in seconds.

  • Sets the follow position camera focus in viewport coordinates ( between 0.f = left / top and 1.f = right / bottom ).

    Declaration

    Objective-C

    - (void)setCameraFocus:(CGPoint)point;

    Swift

    func setCameraFocus(_ point: CGPoint)
  • Gets the follow position camera focus in viewport coordinates ( between 0.f = left / top and 1.f = right / bottom ).

    Declaration

    Objective-C

    - (CGPoint)getCameraFocus;

    Swift

    func getCameraFocus() -> CGPoint
  • Sets manually changes ( via touch handler ) persistent from one follow position session to another. @details Default value is false.

    Declaration

    Objective-C

    - (void)setTouchHandlerModifyPersistent:(BOOL)persistent;

    Swift

    func setTouchHandlerModifyPersistent(_ persistent: Bool)
  • Gets if manually changes ( via touch handler ) are persistent.

    Declaration

    Objective-C

    - (BOOL)getTouchHandlerModifyPersistent;

    Swift

    func getTouchHandlerModifyPersistent() -> Bool
  • Sets allows manually exiting follow position via touch handler events. Default value is true.

    Declaration

    Objective-C

    - (void)setTouchHandlerExitAllow:(BOOL)allowExit;

    Swift

    func setTouchHandlerExitAllow(_ allowExit: Bool)
  • Gets state for allows manually exiting follow position via touch handler events.

    Declaration

    Objective-C

    - (BOOL)getTouchHandlerExitAllow;

    Swift

    func getTouchHandlerExitAllow() -> Bool
  • Set touch handler horizontal angle adjust limits.

    Declaration

    Objective-C

    - (void)setTouchHandlerModifyHorizontalAngleLimits:
        (nonnull NSArray<NSNumber *> *)horizAngleLimits;

    Swift

    func setTouchHandlerModifyHorizontalAngleLimits(_ horizAngleLimits: [NSNumber])

    Parameters

    horizAngleLimits

    . Values must be in { -180., 180. } range @details Empty { 0., 0. } interval can be provided to forbid manually adjusting horizontal angle. Default values are { 0., 0. }

  • Get touch handler horizontal angle adjust limits. Empty { 0., 0. } means value adjustment is forbidden. @details Default returns { 0., 0. }, meaning adjustment is forbidden.

    Declaration

    Objective-C

    - (nonnull NSArray<NSNumber *> *)getTouchHandlerModifyHorizontalAngleLimits;

    Swift

    func getTouchHandlerModifyHorizontalAngleLimits() -> [NSNumber]
  • Set touch handler vertical angle adjust limits

    Declaration

    Objective-C

    - (void)setTouchHandlerModifyVerticalAngleLimits:
        (nonnull NSArray<NSNumber *> *)horizAngleLimits;

    Swift

    func setTouchHandlerModifyVerticalAngleLimits(_ horizAngleLimits: [NSNumber])

    Parameters

    vertAngleLimits

    Vertical angle adjust limits. Values must be in { 0., 90. } range @details Empty { 0., 0. } interval can be provided to forbid manually adjusting vertical angle. Default values are { 0., 70. }

  • Get touch handler vertical angle adjust limits. Empty { 0., 0. } means value adjustment is forbidden. @details Default returns { 0., 70. }

    Declaration

    Objective-C

    - (nonnull NSArray<NSNumber *> *)getTouchHandlerModifyVerticalAngleLimits;

    Swift

    func getTouchHandlerModifyVerticalAngleLimits() -> [NSNumber]
  • Set touch handler distance to object adjust limits.

    Declaration

    Objective-C

    - (void)setTouchHandlerModifyDistanceLimits:
        (nonnull NSArray<NSNumber *> *)horizAngleLimits;

    Swift

    func setTouchHandlerModifyDistanceLimits(_ horizAngleLimits: [NSNumber])

    Parameters

    distanceLimits

    Values must be in { 0, std::numeric_limits::max() } range. @details Empty { 0., 0. } interval can be provided to forbid manually adjusting distance to object. Default values are { 50, std::numeric_limits::max() }

  • Get touch handler distance to object adjust limits. @details Default returns { 50, std::numeric_limits::max() }, meaning no limits in max distance to tracked object.

    Declaration

    Objective-C

    - (nonnull NSArray<NSNumber *> *)getTouchHandlerModifyDistanceLimits;

    Swift

    func getTouchHandlerModifyDistanceLimits() -> [NSNumber]
  • Set the map view perspective in follow position mode.

    Declaration

    Objective-C

    - (void)setPerspective:(MapViewPerspective)perspective
         animationDuration:(NSTimeInterval)duration
         completionHandler:(nonnull void (^)(BOOL))handler;

    Swift

    func setPerspective(_ perspective: MapViewPerspective, animationDuration duration: TimeInterval) async -> Bool

    Parameters

    perspective

    The map perspective.

    duration

    The fly animation duration in milliseconds. 0 means no animation.

    handler

    The block to execute asynchronously with the result.

  • Gets the map view perspective in follow position mode.

    Declaration

    Objective-C

    - (MapViewPerspective)getPerspective;

    Swift

    func getPerspective() -> MapViewPerspective
  • Set vertical angle in follow position mode.

    Declaration

    Objective-C

    - (void)setViewAngle:(double)value;

    Swift

    func setViewAngle(_ value: Double)
  • Gets the vertical angle.

    Declaration

    Objective-C

    - (double)getViewAngle;

    Swift

    func getViewAngle() -> Double
  • Set a zoom level in follow position mode.

    Declaration

    Objective-C

    - (int)setZoomLevel:(int)level animationDuration:(NSTimeInterval)duration;

    Swift

    func setZoomLevel(_ level: Int32, animationDuration duration: TimeInterval) -> Int32

    Parameters

    level

    Zoom level, may be between 0 and getMaxZoomLevel.

    duration

    The animation duration in milliseconds (0 means no animation ).

    Return Value

    The previous zoom level.

  • Get zoom level in follow position mode. @details -1 means auto-zooming is enabled

    Declaration

    Objective-C

    - (int)getZoomLevel;

    Swift

    func getZoomLevel() -> Int32

    Return Value

    The current zoom level.

  • Set map rotation mode in follow position.

    Declaration

    Objective-C

    - (void)setMapRotationMode:(FollowPositionMapRotationMode)mode
                         angle:(double)angle
               objectFollowMap:(BOOL)followMap;

    Swift

    func setMapRotationMode(_ mode: FollowPositionMapRotationMode, angle: Double, objectFollowMap followMap: Bool)

    Parameters

    mode

    Map rotation mode.

    angle

    The fixed rotation angle for FollowPositionMapRotationModeFixed.

    followMap

    The position tracker object orientation will follow map view rotation. @details If the position tracker object orientation will follow map view rotation, all views using the same tracking object will see the object update.

  • Get map rotation mode in follow position.

    Declaration

    Objective-C

    - (FollowPositionMapRotationMode)getMapRotationMode;

    Swift

    func getMapRotationMode() -> FollowPositionMapRotationMode
  • Check if position tracking object rotation follows map rotation.

    Declaration

    Objective-C

    - (BOOL)isTrackObjectFollowingMapRotation;

    Swift

    func isTrackObjectFollowingMapRotation() -> Bool
  • Set accuracy circle visibility.

    Declaration

    Objective-C

    - (void)setAccuracyCircleVisibility:(BOOL)value;

    Swift

    func setAccuracyCircleVisibility(_ value: Bool)
  • Check if accuracy circle is visible.

    Declaration

    Objective-C

    - (BOOL)isAccuracyCircleVisible;

    Swift

    func isAccuracyCircleVisible() -> Bool