Package globus.glmap

Class GLMapAnimation

java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapAnimation

public class GLMapAnimation extends GLNativeObject
GLMapAnimation defines animation of objects parameters that will be executed synchronously.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Type of transition
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Ease in transition
    static final int
    Ease in-out transition
    static final int
    Ease out transition
    static final int
    Linear transition
    static final int
    No transition
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancel(boolean setFinalValues)
    Cancels animation
    void
    Defines the scrolling speed at the end of map scrolling movement.
    void
    flyTo(double lat, double lon)
    Moves to new center with animation optimized for long distances.
    void
    Moves to new center with animation optimized for long distances.
    void
    Moves to new center with animation optimized for long distances.
    void
    setAngle(GLMapDrawable drawable, float angle)
    Sets new angle of drawable
    void
    setContinueFlyTo(boolean continueFlyTo)
    If true flyTo animation will be used if new mapCenter is set and previous flyTo animation is not finished yet
    void
    setDuration(double duration)
    Sets duration of animation
    void
    setFocusPoint(MapPoint focusPoint)
    Sets focus point of zoom and rotate animations
    void
    setOffset(GLMapDrawable drawable, short ox, short oy)
    Sets new offset of drawable
    void
    Sets callback that will be called when animation finished
    void
    setPosition(GLMapDrawable drawable, MapPoint position)
    Set new position of drawable
    void
    setScale(GLMapDrawable drawable, double scale)
    Sets new scale of drawable
    void
    setTransition(int transition)
    Sets transition of animation

    Methods inherited from class globus.glmap.GLNativeObject

    dispose

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
    • setContinueFlyTo

      public void setContinueFlyTo(boolean continueFlyTo)
      If true flyTo animation will be used if new mapCenter is set and previous flyTo animation is not finished yet
      Parameters:
      continueFlyTo - continue flyTo animation
    • 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 - newt y offset
    • flyToPoint

      public void flyToPoint(@NonNull MapPoint point)
      Moves to new center with animation optimized for long distances.
      Parameters:
      point - Target location
    • flyToGeoPoint

      public void flyToGeoPoint(@NonNull MapGeoPoint point)
      Moves to new center with animation optimized for long distances.
      Parameters:
      point - Target location
    • flyTo

      public void flyTo(double lat, double lon)
      Moves to new center with animation optimized for long distances.
      Parameters:
      lat - Target latitude
      lon - Target longitude
    • 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 it's final values