MMKPlacemarkAnimation

class MMKPlacemarkAnimation : NSObject

Provides an interface to load and control animation of placemark.

Summary

Instance methods

func setIconWithImage( image: MRTAnimatedImageProvider, style: MMKIconStyle_)
Sets the animated image and icon style

func setIconWithImage( image: MRTAnimatedImageProvider_,
                        style: MMKIconStyle,
                     callback: @escaping MMKCallback)
Sets the animated image and icon style

func setIconStyleWith( style: MMKIconStyle_)
Changes the icon style

func play()
Starts animation

func play(callback: @escaping MMKCallback)
Starts animation and handles the callback

func resume()
Resumes paused animation

func stop()
Stops animation

func pause()
Pauses animation

Properties

var isReversed: Bool { get set }
If true, animation will be played in the reverse direction

var isValid: Bool { get }
Tells if this object is valid or no

Instance methods

setIconWithImage(_:style:)

func setIconWithImage( image: MRTAnimatedImageProvider, style: MMKIconStyle_)

Sets the animated image and icon style. The new animation will be in the paused state.


setIconWithImage(_:style:callback:)

func setIconWithImage( image: MRTAnimatedImageProvider_,
                        style: MMKIconStyle,
                     callback: @escaping MMKCallback)

Sets the animated image and icon style. The new animation will be in the paused state.

Parameters

onFinished

is called when the icon is loaded.


setIconStyleWith(_:)

func setIconStyleWith( style: MMKIconStyle_)

Changes the icon style.


play()

func play()

Starts animation. Removes the current play callback. Same as play(null).


play(callback:)

func play(callback: @escaping MMKCallback)

Starts animation and handles the callback.

Parameters

onFinished

is called when animation finishes and replaces the previous callback.


resume()

func resume()

Resumes paused animation. Callback (if any) is NOT removed.


stop()

func stop()

Stops animation. Animation returns to the initial paused state.


pause()

func pause()

Pauses animation.


Properties

isReversed

var isReversed: Bool { get set }

If true, animation will be played in the reverse direction. Default value is false.


isValid

var isValid: Bool { get }

Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.