Builder

class Builder(sourceId: String)

Builder for GeoJsonSource.

Parameters

sourceId

the ID of the source

Constructors

Builder
Link copied to clipboard
fun Builder(sourceId: String)
the ID of the source

Functions

attribution
Link copied to clipboard
fun attribution(value: String): <ERROR CLASS>
Contains an attribution to be displayed when the map is shown to a user.
buffer
Link copied to clipboard
fun buffer(value: Long = 128L): <ERROR CLASS>
Size of the tile buffer on each side.
build
Link copied to clipboard
fun build(): GeoJsonSource
Build the GeoJsonSource.
cluster
Link copied to clipboard
fun cluster(value: Boolean = false): <ERROR CLASS>
If the data is a collection of point features, setting this to true clusters the points by radius into groups.
clusterMaxZoom
Link copied to clipboard
fun clusterMaxZoom(value: Long): <ERROR CLASS>
Max zoom on which to cluster points if clustering is enabled.
clusterProperties
Link copied to clipboard
fun clusterProperties(value: <ERROR CLASS><String, Any>): <ERROR CLASS>
An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points.
clusterProperty
Link copied to clipboard
fun clusterProperty(propertyName: String, mapExpr: Expression): <ERROR CLASS>
An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points.
fun clusterProperty(propertyName: String, operatorExpr: Expression, mapExpr: Expression): <ERROR CLASS>
An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points.
clusterRadius
Link copied to clipboard
fun clusterRadius(value: Long = 50L): <ERROR CLASS>
Radius of each cluster if clustering is enabled.
data
Link copied to clipboard
fun data(value: String): <ERROR CLASS>
A URL to a GeoJSON file, or inline GeoJSON.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
feature
Link copied to clipboard
fun feature(value: Feature): <ERROR CLASS>
Add a Feature to the GeojsonSource.
featureCollection
Link copied to clipboard
fun featureCollection(value: FeatureCollection): <ERROR CLASS>
Add a FeatureCollection to the GeojsonSource.
generateId
Link copied to clipboard
fun generateId(value: Boolean = false): <ERROR CLASS>
Whether to generate ids for the geojson features.
geometry
Link copied to clipboard
fun geometry(value: Geometry): <ERROR CLASS>
Add a Geometry to the GeojsonSource.
hashCode
Link copied to clipboard
open fun hashCode(): Int
lineMetrics
Link copied to clipboard
fun lineMetrics(value: Boolean = false): <ERROR CLASS>
Whether to calculate line distance metrics.
maxzoom
Link copied to clipboard
fun maxzoom(value: Long = 18L): <ERROR CLASS>
Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).
prefetchZoomDelta
Link copied to clipboard
fun prefetchZoomDelta(value: Long = 4L): <ERROR CLASS>
When loading a map, if PrefetchZoomDelta is set to any number greater than 0, the map will first request a tile at zoom level lower than zoom - delta, but so that the zoom level is multiple of delta, in an attempt to display a full map at lower resolution as quick as possible.
promoteId
Link copied to clipboard
fun promoteId(value: PromoteId): <ERROR CLASS>
A property to use as a feature id (for feature state).
tolerance
Link copied to clipboard
fun tolerance(value: Double = 0.375): <ERROR CLASS>
Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).
toString
Link copied to clipboard
open fun toString(): String
url
Link copied to clipboard
fun url(value: String): <ERROR CLASS>
A URL to a GeoJSON file, or inline GeoJSON.

Properties

sourceId
Link copied to clipboard
val sourceId: String
the ID of the source