feature Collection
Add a Feature Collection to the GeojsonSource. The data will be scheduled and applied on a worker thread.
In order to capture events when actual data is drawn on the map please refer to Observer API and listen to SourceDataLoaded
(optionally pass data-id
to filter the events) or MapLoadingError
with type = metadata
if data parsing error has occurred.
Note: This method is not thread-safe. The FeatureCollection is parsed on a worker thread, please make sure the FeatureCollection is immutable as well as all collections that are used to build it.
Parameters
value
the feature collection
data Id
optional metadata to filter the SOURCE_DATA_LOADED events later. Empty string is treated as no data id.