Package globus.glmap

Class GLMapAnimation

java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapAnimation
All Implemented Interfaces:
AutoCloseable

public class GLMapAnimation extends GLNativeObject
GLMapAnimation defines animation of objects parameters that will be executed synchronously.
  • Field Details

  • Constructor Details

    • GLMapAnimation

      public GLMapAnimation()
      Default constructor
  • Method Details

    • setOnFinish

      public void setOnFinish(@NonNull Runnable onFinish)
      Sets callback that will be called when animation finished
      Parameters:
      onFinish - callback
    • setTransition

      public void setTransition(int transition)
      Sets transition of animation
      Parameters:
      transition - new transition of animation
    • setDuration

      public void setDuration(double duration)
      Sets duration of animation
      Parameters:
      duration - duration in seconds
    • setFocusPoint

      public void setFocusPoint(@NonNull MapPoint focusPoint)
      Sets focus point of zoom and rotate animations
      Parameters:
      focusPoint - focus point
    • setFlyToMode

      public void setFlyToMode(int flyToMode)
      Sets new fly to mode. Default is FlyToMode.Continue.
      Parameters:
      flyToMode - mode to set
    • getFlyToMode

      public int getFlyToMode()
      Returns fly to mode
      Returns:
      current fly to mode
    • setPosition

      public void setPosition(@NonNull GLMapDrawable drawable, @NonNull MapPoint position)
      Set new position of drawable
      Parameters:
      drawable - drawable to modify
      position - new position
    • setScale

      public void setScale(@NonNull GLMapDrawable drawable, double scale)
      Sets new scale of drawable
      Parameters:
      drawable - drawable to modify
      scale - new scale
    • setAngle

      public void setAngle(@NonNull GLMapDrawable drawable, float angle)
      Sets new angle of drawable
      Parameters:
      drawable - drawable to modify
      angle - new angle
    • setOffset

      public void setOffset(@NonNull GLMapDrawable drawable, short ox, short oy)
      Sets new offset of drawable
      Parameters:
      drawable - drawable to modify
      ox - new x offset
      oy - new y offset
    • decelerate

      public void decelerate(@NonNull MapPoint speed)
      Defines the scrolling speed at the end of map scrolling movement.
      Parameters:
      speed - initial speed of decelerate
    • cancel

      public void cancel(boolean setFinalValues)
      Cancels animation
      Parameters:
      setFinalValues - if true animated parameters will be set to their final values