VectorSource

Vector source, allows the use of vector tiles.

See also

Constructors

Link copied to clipboard
constructor(id: String?, url: URL)

Create a vector source from a remote url pointing to a TileJSON resource

constructor(id: String?, uri: Uri)

Create a vector source from an URI.

constructor(id: String?, uri: String?)

Create a vector source from an URI.

constructor(id: String?, tileSet: TileSet)

Create a vector source from a tileset

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
Link copied to clipboard
val uri: String?

Get the source URI.

Link copied to clipboard
val url: String?

Functions

Link copied to clipboard
fun getFeatureState(sourceLayerId: String, featureId: String): JsonObject?

Gets the current state of a feature in this source.

Link copied to clipboard
fun querySourceFeatures(@Size(min = 1) sourceLayerIds: Array<String>, filter: Expression?): List<Feature>

Queries the source for features.

Link copied to clipboard
fun removeFeatureState(sourceLayerId: String, featureId: String): Boolean

Removes all state from a single feature in this source.

fun removeFeatureState(sourceLayerId: String, featureId: String?, stateKey: String?): Boolean

Removes state from a feature in this source, or from all features in a source layer when featureId is null.

Link copied to clipboard
fun resetFeatureStates(sourceLayerId: String): Boolean

Removes all feature state entries from the given source layer.

Link copied to clipboard
open fun setDetached()
Link copied to clipboard
fun setFeatureState(sourceLayerId: String, featureId: String, state: JsonObject): Boolean

Sets the state of a feature in this source.