featureCollection

Add a FeatureCollection to the GeojsonSource. If onDataParsed is provided and not null - data will be loaded in async mode. Otherwise method will be synchronous.

If synchronous method is called while another asynchronous method is parsing data - asynchronous method will not apply when data is parsed.

Parameters

onDataParsed

optional callback notifying when data is parsed on a worker thread

value

the feature collection

fun featureCollection(value: FeatureCollection, onDataParsed: (GeoJsonSource) -> Unit?): GeoJsonSource