Package globus.glmap
Class GLMapAnimation
- java.lang.Object
-
- globus.glmap.GLNativeObject
-
- globus.glmap.GLMapAnimation
-
public class GLMapAnimation extends GLNativeObject
GLMapAnimationdefines animation of objects parameters that will be executed synchronously.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGLMapAnimation.Animation
-
Constructor Summary
Constructors Constructor Description GLMapAnimation()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel(boolean setFinalValues)Cancels animationvoiddecelerate(MapPoint speed)Defines the scrolling speed at the end of map scrolling movement.voidflyTo(double lat, double lon)Moves to new center with animation optimized for long distances.voidflyToGeoPoint(MapGeoPoint point)Moves to new center with animation optimized for long distances.voidflyToPoint(MapPoint point)Moves to new center with animation optimized for long distances.voidsetAngle(GLMapDrawable drawable, float angle)Sets new angle of drawablevoidsetContinueFlyTo(boolean continueFlyTo)If true flyTo animation will be used if new mapCenter is set and previous flyTo animation is not finished yetvoidsetDuration(double duration)Sets duration of animationvoidsetFocusPoint(MapPoint focusPoint)Sets focus point of zoom and rotate animationsvoidsetOffset(GLMapDrawable drawable, short ox, short oy)Sets new offset of drawablevoidsetOnFinish(java.lang.Runnable onFinish)Sets callback that will be called when animation finishedvoidsetPosition(GLMapDrawable drawable, MapPoint position)Set new position of drawablevoidsetScale(GLMapDrawable drawable, double scale)Sets new scale of drawablevoidsetTransition(int transition)Sets transition of animation-
Methods inherited from class globus.glmap.GLNativeObject
dispose
-
-
-
-
Field Detail
-
None
public static final int None
- See Also:
- Constant Field Values
-
Linear
public static final int Linear
- See Also:
- Constant Field Values
-
EaseIn
public static final int EaseIn
- See Also:
- Constant Field Values
-
EaseOut
public static final int EaseOut
- See Also:
- Constant Field Values
-
EaseInOut
public static final int EaseInOut
- See Also:
- Constant Field Values
-
-
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 modifyposition- new position
-
setScale
public void setScale(@NonNull GLMapDrawable drawable, double scale)Sets new scale of drawable- Parameters:
drawable- drawable to modifyscale- new scale
-
setAngle
public void setAngle(@NonNull GLMapDrawable drawable, float angle)Sets new angle of drawable- Parameters:
drawable- drawable to modifyangle- new angle
-
setOffset
public void setOffset(@NonNull GLMapDrawable drawable, short ox, short oy)Sets new offset of drawable- Parameters:
drawable- drawable to modifyox- new x offsetoy- 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 latitudelon- 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
-
-