MMKPlacemarkAnimation

class MMKPlacemarkAnimation : MMKPlacemarkPresentation

Provides an interface to load and control animation of placemark.

Summary

Instance methods

func setIconWithImage(_ image: any MRTAnimatedImageProvider,
                        style: MMKIconStyle)
Sets the animated image and icon style

func setIconWithImage(_ image: any 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

Instance methods

setIconWithImage(_:style:)

func setIconWithImage(_ image: any 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: any 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.