GLMapAnimation

Objective-C


@interface GLMapAnimation : NSObject

Swift

class GLMapAnimation : NSObject

GLMapAnimation defines the animation of object parameters that will be executed synchronously.

  • Initializes GLMapAnimation with a completion block.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCompletion:
        (GLMapAnimationCompletionBlock _Nullable)completion;

    Swift

    init(completion: GLMapAnimationCompletionBlock? = nil)

    Parameters

    completion

    The completion block to be called when the animation ends.

  • Animation transition. The default transition is Ease In - Ease Out.

    Declaration

    Objective-C

    @property GLMapTransitionFunction transition;

    Swift

    var transition: GLMapTransitionFunction { get set }
  • Animation duration. The default duration is 0.5 seconds.

    Declaration

    Objective-C

    @property double duration;

    Swift

    var duration: Double { get set }
  • Focus point for zoom and rotate animations.

    Declaration

    Objective-C

    @property GLMapPoint focusPoint;

    Swift

    var focusPoint: GLMapPoint { get set }
  • Mode for fly to animation. By default is GLFlyToMode_Continue

    Declaration

    Objective-C

    @property GLFlyToMode flyToMode;

    Swift

    var flyToMode: GLFlyToMode { get set }
  • Sets a new position for the drawable.

    Declaration

    Objective-C

    - (void)setPosition:(GLMapPoint)position
            forDrawable:(nonnull GLMapDrawable *)drawable;

    Swift

    func setPosition(_ position: GLMapPoint, for drawable: GLMapDrawable)

    Parameters

    position

    The new position.

    drawable

    The drawable to modify.

  • Sets a new scale for the drawable.

    Declaration

    Objective-C

    - (void)setScale:(double)scale forDrawable:(nonnull GLMapDrawable *)drawable;

    Swift

    func setScale(_ scale: Double, for drawable: GLMapDrawable)

    Parameters

    scale

    The new scale.

    drawable

    The drawable to modify.

  • Sets a new angle for the drawable.

    Declaration

    Objective-C

    - (void)setAngle:(float)angle forDrawable:(nonnull GLMapDrawable *)drawable;

    Swift

    func setAngle(_ angle: Float, for drawable: GLMapDrawable)

    Parameters

    angle

    The new angle.

    drawable

    The drawable to modify.

  • Sets a new offset for the drawable.

    Declaration

    Objective-C

    - (void)setOffset:(CGPoint)offset forDrawable:(nonnull GLMapDrawable *)drawable;

    Swift

    func setOffset(_ offset: CGPoint, for drawable: GLMapDrawable)

    Parameters

    offset

    The new offset.

    drawable

    The drawable to modify.

  • Defines the scrolling speed at the end of the map scrolling movement.

    Declaration

    Objective-C

    - (void)decelerate:(GLMapPoint)velocity;

    Swift

    func decelerate(_ velocity: GLMapPoint)

    Parameters

    velocity

    The initial velocity of deceleration.

  • Cancels the animation.

    Declaration

    Objective-C

    - (void)cancel:(BOOL)setFinalValues;

    Swift

    func cancel(_ setFinalValues: Bool)

    Parameters

    setFinalValues

    If YES, the animated values will be set to their final values.