geometry

Add a Geometry 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 geometry(value: Geometry, onDataParsed: (GeoJsonSource) -> Unit?): GeoJsonSource