MTGeoJSONSource

@Serializable
class MTGeoJSONSource : MTSource

A geojson source.

Constructors

constructor(identifier: String, attribution: String?, url: URL?, jsonString: String?, buffer: Int?, isCluster: Boolean, clusterMaxZoom: Double?, clusterRadius: Double?, maxZoom: Double?, tolerance: Double?, lineMetrics: Boolean?)
constructor(identifier: String, url: URL)
constructor(identifier: String, jsonString: String)

Types

Properties

Attribution to be displayed when the map is shown to a user.

var buffer: Int?

Size of the tile buffer on each side.

Max zoom on which to cluster points if clustering is enabled.

Radius of each cluster if clustering is enabled.

@SerialName(value = "id")
open override var identifier: String

Unique identifier of a source.

@SerialName(value = "cluster")
var isCluster: Boolean

If the data is a collection of point features, sets the points by radius into groups.

GeoJSON String.

Specifies whether to calculate line distance metrics

@SerialName(value = "maxzoom")
var maxZoom: Double?

Maximum zoom level at which to create vector tiles.

Douglas-Peucker simplification tolerance.

open override var type: MTSourceType

Type of the layer.

@Serializable(with = URLAsStringSerializer::class)
@SerialName(value = "data")
open override var url: URL?

A URL to a GeoJSON resource. Supported protocols are http, https.

Functions

fun setData(data: URL, mapViewController: MTMapViewController)

Sets the data of the source.