Package globus.glmap

Class GLMapAnimation


  • public class GLMapAnimation
    extends GLNativeObject
    GLMapAnimation defines animation of objects parameters that will be executed synchronously.
    • 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

      All Methods Instance Methods Concrete Methods 
      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 java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GLMapAnimation

        public GLMapAnimation()
        Default constructor
    • Method Detail

      • setOnFinish

        public void setOnFinish​(@NonNull
                                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​(@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