data

fun data(value: String, dataId: String = ""): GeoJsonSource

Sets GeoJson data property as a String. value could be an URL to a GeoJSON file, or an inline GeoJSON.

The data will be scheduled and applied on a worker thread and no validation happens synchronously. If value is invalid - MapLoadingError with type = source will be invoked.

Parameters

value

an URL to a GeoJSON file, or an inline GeoJSON.

dataId

optional metadata to filter the SOURCE_DATA_LOADED events later. Empty string is treated as no data id.


val data: String?

A URL to a GeoJSON file, or inline GeoJSON.

Note: Getter for plain Geojson string data is not supported due to performance consideration.