geometry

fun geometry(value: Geometry): GeoJsonSource

Add a Geometry to the GeojsonSource. Data will be parsed from collection to String in a worker thread and use main thread to pass this data to gl-native.

In order to capture events when actual data is drawn on the map please refer to Observer API and listen to MapEvents.SOURCE_DATA_LOADED or MapEvents.MAP_LOADING_ERROR with type = metadata if data parsing error has occurred.

Note: This method is not thread-safe. The Geometry is parsed on a worker thread, please make sure the Geometry is immutable.

Parameters

value

the geometry