Package globus.glmap
Class GLMapTrack
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapDrawObject
globus.glmap.GLMapTrackLayer
globus.glmap.GLMapTrack
- All Implemented Interfaces:
AutoCloseable
GLMapTrack is a bridge class, to work with GLMap internal representation of track on
map.-
Nested Class Summary
Nested classes/interfaces inherited from class globus.glmap.GLMapTrackLayer
GLMapTrackLayer.DataCallbackNested classes/interfaces inherited from class globus.glmap.GLMapDrawObject
GLMapDrawObject.UpdateCompletion, GLMapDrawObject.UpdateResult -
Constructor Summary
ConstructorsConstructorDescriptionCreates new empty track that will be injected to mapGLMapTrack(int drawOrder) Creates new empty track that will draw above map with given draw order -
Method Summary
Modifier and TypeMethodDescriptionvoidsetData(GLMapTrackData data, GLMapVectorStyle style, GLMapDrawObject.UpdateCompletion completion) Sets new track datavoidsetProgressColor(int color) Sets color of track from start to progress indexvoidsetProgressEndIndex(double progressIndex) Track outside the [progressIndex, progressEndIndex] range will change color to progress color.voidsetProgressIndex(double progressIndex) Track from start to progress index will change color to progress color.voidsetStyle(GLMapVectorStyle style) Sets width of track and other parametersvoidsetStyle(GLMapVectorStyle style, GLMapDrawObject.UpdateCompletion completion) Sets width of track and other parametersMethods inherited from class globus.glmap.GLMapTrackLayer
setStyleAndCallbackMethods inherited from class globus.glmap.GLMapDrawObject
getDrawOrder, isHidden, setHiddenMethods inherited from class globus.glmap.GLNativeObject
close, dispose
-
Constructor Details
-
GLMapTrack
public GLMapTrack()Creates new empty track that will be injected to map -
GLMapTrack
public GLMapTrack(int drawOrder) Creates new empty track that will draw above map with given draw order- Parameters:
drawOrder- draw order of object
-
-
Method Details
-
setData
public void setData(@Nullable GLMapTrackData data, @NonNull GLMapVectorStyle style, @Nullable GLMapDrawObject.UpdateCompletion completion) Sets new track data- Parameters:
data- new trackDatastyle- visual style of trackcompletion- optional runnable that called when object is ready to draw
-
setProgressColor
public void setProgressColor(int color) Sets color of track from start to progress index- Parameters:
color- color of track from start to progress index (ARGB,0xAARRGGBB)
-
setProgressIndex
public void setProgressIndex(double progressIndex) Track from start to progress index will change color to progress color. Animatable. NaN or infinity leaves the boundary unset; indices past the last point resolve to the track end. A change to or from an unset value is applied without interpolation.- Parameters:
progressIndex- fractional point index along the underlyingGLMapTrackDatageometry
-
setProgressEndIndex
public void setProgressEndIndex(double progressIndex) Track outside the [progressIndex, progressEndIndex] range will change color to progress color. Animatable. NaN or infinity leaves the boundary unset; indices past the last point resolve to the track end. A change to or from an unset value is applied without interpolation.- Parameters:
progressIndex- fractional point index along the underlyingGLMapTrackDatageometry
-
setStyle
public void setStyle(@NonNull GLMapVectorStyle style, @Nullable GLMapDrawObject.UpdateCompletion completion) Sets width of track and other parameters- Parameters:
style- style that contains parameterscompletion- optional runnable that called when object is ready to draw
-
setStyle
Sets width of track and other parameters- Parameters:
style- style that contains parameters
-