Package globus.glmap

Class GLMapAnimation

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

@ParametersAreNonnullByDefault
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  GLMapAnimation.Animation  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int EaseIn  
    static int EaseInOut  
    static int EaseOut  
    static int Linear  
    static int None  
  • Constructor Summary

    Constructors 
    Constructor Description
    GLMapAnimation()
    Default constructor
  • Method Summary

    Modifier and Type Method Description
    void cancel​(boolean setFinalValues)
    Cancels animation
    void decelerate​(MapPoint speed)
    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 flyToGeoPoint​(MapGeoPoint point)
    Moves to new center with animation optimized for long distances.
    void flyToPoint​(MapPoint point)
    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 setOnFinish​(java.lang.Runnable onFinish)
    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

  • Method Details

    • setOnFinish

      public void setOnFinish​(java.lang.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​(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​(GLMapDrawable drawable, MapPoint position)
      Set new position of drawable
      Parameters:
      drawable - drawable to modify
      position - new position
    • setScale

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

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

      public void setOffset​(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​(MapPoint point)
      Moves to new center with animation optimized for long distances.
      Parameters:
      point - Target location
    • flyToGeoPoint

      public void flyToGeoPoint​(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​(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