CustomGeometrySource

Custom Vector Source, allows using FeatureCollections.

CustomGeometrySource uses a coalescing model for frequent data updates targeting the same tile id, which means, that the in-progress request as well as the last scheduled request are guaranteed to finish. Any requests scheduled meanwhile can be canceled.

Constructors

Link copied to clipboard
constructor(id: String?, options: CustomGeometrySourceOptions?, provider: GeometryTileProvider?)
constructor(id: String?, provider: GeometryTileProvider?)

Create a CustomGeometrySource

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:NonNull
open val attribution: String
Link copied to clipboard
@get:NonNull
open val id: String
Link copied to clipboard
@get:NonNull
open var isVolatile: Boolean
Link copied to clipboard
Link copied to clipboard
open val nativePtr: Long
Link copied to clipboard

Functions

Link copied to clipboard

Invalidate previously provided features within a given bounds at all zoom levels. Invoking this method will result in new requests to GeometryTileProvider for regions that contain, include, or intersect with the provided bounds.

Link copied to clipboard
fun invalidateTile(zoomLevel: Int, x: Int, y: Int)

Invalidate the geometry contents of a specific tile. Invoking this method will result in new requests to GeometryTileProvider for visible tiles.

Link copied to clipboard
fun querySourceFeatures(filter: Expression?): List<Feature>

Queries the source for features.

Link copied to clipboard
open fun setDetached()
Link copied to clipboard
fun setTileData(zoomLevel: Int, x: Int, y: Int, data: FeatureCollection)

Set or update geometry contents of a specific tile. Use this method to update tiles for which GeometryTileProvider was previously invoked. This method can be called from background threads.