Package globus.glmap

Class GLMapVectorLayer

All Implemented Interfaces:
AutoCloseable

public class GLMapVectorLayer extends GLMapDrawable
Drawable with vector objects
  • 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)
      Parameters:
      object - vector geometry to display instead of the layer's current contents
      style - cascade style used to prepare the geometry for drawing
      completion - 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 returns
      style - cascade style used to prepare the geometries for drawing
      completion - optional terminal-outcome callback delivered asynchronously on the main thread; null to omit the callback