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

    - (instancetype)initWithCompletion:(GLMapAnimationCompletionBlock)completion;

    Swift

    init!(completion: GLMapAnimationCompletionBlock!)

    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 }
  • If YES, the flyTo animation will be used if a new mapCenter is set and the previous flyTo animation is not finished yet. The default value is YES.

    Declaration

    Objective-C

    @property BOOL continueFlyTo;

    Swift

    var continueFlyTo: Bool { get set }
  • Sets a new position for the drawable.

    Declaration

    Objective-C

    - (void)setPosition:(GLMapPoint)position forDrawable:(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:(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:(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:(GLMapDrawable *)drawable;

    Swift

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

    Parameters

    offset

    The new offset.

    drawable

    The drawable to modify.

  • Moves to a new center with an animation optimized for long distances.

    Declaration

    Objective-C

    - (void)flyToPoint:(GLMapPoint)point;

    Swift

    func fly(to point: GLMapPoint)

    Parameters

    point

    The target location.

  • Moves to a new center with an animation optimized for long distances.

    Declaration

    Objective-C

    - (void)flyToGeoPoint:(GLMapGeoPoint)geoPoint;

    Swift

    func fly(to geoPoint: GLMapGeoPoint)

    Parameters

    geoPoint

    The target location.

  • Uses the “fly to” animation to change the map position and zoom.

    Declaration

    Objective-C

    - (void)useFlyTo;

    Swift

    func useFlyTo()
  • 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.