Package globus.glmap
Class GLMapVectorLayer
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapDrawObject
globus.glmap.GLMapDrawable
globus.glmap.GLMapVectorLayer
- All Implemented Interfaces:
AutoCloseable
Drawable with vector objects
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceReceives one terminal outcome on the main thread.static @interfaceTerminal outcome of one vector update.Nested classes/interfaces inherited from class globus.glmap.GLMapDrawable
GLMapDrawable.DrawTarget, GLMapDrawable.TransformMode -
Constructor Summary
ConstructorsConstructorDescriptionCreates new empty image that will be injected to mapGLMapVectorLayer(int drawOrder) Creates new empty image with given draw order -
Method Summary
Modifier and TypeMethodDescriptionvoidsetVectorObject(GLMapVectorObject object, GLMapVectorCascadeStyle style, GLMapVectorLayer.UpdateCompletion completion) Replaces the layer's geometry with one object; seesetVectorObjects(globus.glmap.GLMapVectorObjectList, globus.glmap.GLMapVectorCascadeStyle, globus.glmap.GLMapVectorLayer.UpdateCompletion)for update lifecycle details.voidsetVectorObjects(GLMapVectorObjectList objects, GLMapVectorCascadeStyle style, GLMapVectorLayer.UpdateCompletion completion) Sets objects and reports one terminal outcome asynchronously on the main thread.Methods inherited from class globus.glmap.GLMapDrawable
getAngle, getDrawTarget, getHeight, getOffset, getPosition, getRotatesWithMap, getScale, getScreenBBox, getWidth, setAngle, setDrawTarget, setOffset, setPosition, setRotatesWithMap, setScale, setTransformModeMethods inherited from class globus.glmap.GLMapDrawObject
getDrawOrder, isHidden, setHiddenMethods inherited from class globus.glmap.GLNativeObject
close, dispose
-
Constructor Details
-
GLMapVectorLayer
public GLMapVectorLayer(int drawOrder) Creates new empty image with given draw order- Parameters:
drawOrder- Draw order used to sort objects on map
-
GLMapVectorLayer
public GLMapVectorLayer()Creates new empty image that will be injected to map
-
-
Method Details
-
setVectorObject
@MainThread public void setVectorObject(@NonNull GLMapVectorObject object, @NonNull GLMapVectorCascadeStyle style, @Nullable GLMapVectorLayer.UpdateCompletion completion) Replaces the layer's geometry with one object; seesetVectorObjects(globus.glmap.GLMapVectorObjectList, globus.glmap.GLMapVectorCascadeStyle, globus.glmap.GLMapVectorLayer.UpdateCompletion)for update lifecycle details.- Parameters:
object- vector geometry to display instead of the layer's current contentsstyle- cascade style used to prepare the geometry for drawingcompletion- optional terminal-outcome callback delivered asynchronously on the main thread; null to omit the callback
-
setVectorObjects
@MainThread public void setVectorObjects(@NonNull GLMapVectorObjectList objects, @NonNull GLMapVectorCascadeStyle style, @Nullable GLMapVectorLayer.UpdateCompletion completion) Sets objects and reports one terminal outcome asynchronously on the main thread. Submit on the main thread. Native references are retained before this method returns, so the submitted list may be closed immediately (the retained objects must not be mutated concurrently). A request replaced before its build starts is Superseded. A running build may finish before the next request. Removing the layer or losing its surface cancels outstanding requests. Cancelling preparation cancels the request being prepared. A detached layer or a paused map keeps its request pending until drawing resumes, the request is superseded, or the layer is released. Ready means batches were installed, not that a frame was presented. Cancellation does not clear stored geometry; reattaching or resuming may rebuild it without another callback for the cancelled request. Failed reports disposed native inputs or an exception during preparation; previously installed batches are preserved.- Parameters:
objects- vector geometries to display instead of the layer's current contents; the list may be closed after this call returnsstyle- cascade style used to prepare the geometries for drawingcompletion- optional terminal-outcome callback delivered asynchronously on the main thread; null to omit the callback
-