GLMapAnimation

Objective-C


@interface GLMapAnimation : NSObject

Swift

class GLMapAnimation : NSObject

GLMapAnimation defines animation of objects parameters that will be executed synchronously.

  • Initializes GLMapAnimation

    Declaration

    Objective-C

    - (instancetype)initWithCompletion:(GLMapAnimationCompletionBlock)completion;

    Swift

    init!(completion: GLMapAnimationCompletionBlock!)
  • Transition of animation. Default transition is Ease In - Ease Out

    Declaration

    Objective-C

    @property GLMapTransitionFunction transition;

    Swift

    var transition: GLMapTransitionFunction { get set }
  • Duration of animation. Default duration is 0.5 seconds.

    Declaration

    Objective-C

    @property double duration;

    Swift

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

    Declaration

    Objective-C

    @property GLMapPoint focusPoint;

    Swift

    var focusPoint: GLMapPoint { get set }
  • If YES flyTo animation will be used if new mapCenter is set and previous flyTo animation is not finished yet. Default value YES.

    Declaration

    Objective-C

    @property BOOL continueFlyTo;

    Swift

    var continueFlyTo: Bool { get set }
  • Sets new position of drawable

    Declaration

    Objective-C

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

    Swift

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

    Parameters

    drawable

    drawable to modify

    position

    new position

  • Sets new scale of drawable

    Declaration

    Objective-C

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

    Swift

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

    Parameters

    drawable

    drawable to modify

    scale

    new scale

  • Sets new angle of drawable

    Declaration

    Objective-C

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

    Swift

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

    Parameters

    drawable

    drawable to modify

    angle

    new angle

  • Sets new offset of drawable

    Declaration

    Objective-C

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

    Swift

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

    Parameters

    offset

    new offset

    drawable

    drawable to modify

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

    Declaration

    Objective-C

    - (void)flyToPoint:(GLMapPoint)point;

    Swift

    func fly(to point: GLMapPoint)

    Parameters

    point

    Target location.

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

    Declaration

    Objective-C

    - (void)flyToGeoPoint:(GLMapGeoPoint)geoPoint;

    Swift

    func fly(to geoPoint: GLMapGeoPoint)

    Parameters

    geoPoint

    Target location.

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

    Declaration

    Objective-C

    - (void)useFlyTo;

    Swift

    func useFlyTo()
  • Defines the scrolling speed at the end of map scrolling movement.

    Declaration

    Objective-C

    - (void)decelerate:(GLMapPoint)velocity;

    Swift

    func decelerate(_ velocity: GLMapPoint)

    Parameters

    velocity

    Initial velocity of deceleration

  • Cancels anmation

    Declaration

    Objective-C

    - (void)cancel:(BOOL)setFinalValues;

    Swift

    func cancel(_ setFinalValues: Bool)

    Parameters

    setFinalValues

    if YES aimatied values will be set to it’s final values.