Package globus.glmap
Class GLMapAnimation
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapAnimation
GLMapAnimation
defines animation of objects parameters that will be executed
synchronously.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
Type of transition -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel
(boolean setFinalValues) Cancels animationvoid
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 drawablevoid
setContinueFlyTo
(boolean continueFlyTo) If true flyTo animation will be used if new mapCenter is set and previous flyTo animation is not finished yetvoid
setDuration
(double duration) Sets duration of animationvoid
setFocusPoint
(MapPoint focusPoint) Sets focus point of zoom and rotate animationsvoid
setOffset
(GLMapDrawable drawable, short ox, short oy) Sets new offset of drawablevoid
setOnFinish
(Runnable onFinish) Sets callback that will be called when animation finishedvoid
setPosition
(GLMapDrawable drawable, MapPoint position) Set new position of drawablevoid
setScale
(GLMapDrawable drawable, double scale) Sets new scale of drawablevoid
setTransition
(int transition) Sets transition of animationMethods inherited from class globus.glmap.GLNativeObject
dispose
-
Field Details
-
None
public static final int NoneNo transition- See Also:
-
Linear
public static final int LinearLinear transition- See Also:
-
EaseIn
public static final int EaseInEase in transition- See Also:
-
EaseOut
public static final int EaseOutEase out transition- See Also:
-
EaseInOut
public static final int EaseInOutEase in-out transition- See Also:
-
-
Constructor Details
-
GLMapAnimation
public GLMapAnimation()Default constructor
-
-
Method Details
-
setOnFinish
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
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
Set new position of drawable- Parameters:
drawable
- drawable to modifyposition
- new position
-
setScale
Sets new scale of drawable- Parameters:
drawable
- drawable to modifyscale
- new scale
-
setAngle
Sets new angle of drawable- Parameters:
drawable
- drawable to modifyangle
- new angle
-
setOffset
Sets new offset of drawable- Parameters:
drawable
- drawable to modifyox
- new x offsetoy
- newt y offset
-
flyToPoint
Moves to new center with animation optimized for long distances.- Parameters:
point
- Target location
-
flyToGeoPoint
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
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
-