geo Json Source
DSL function for GeoJsonSource accepting empty data source. Immediately returns GeoJsonSource with no data set.
DSL function for GeoJsonSource.
Immediately returns GeoJsonSource with no data set and starts preparing actual data using a worker thread if GeoJsonSource.Builder.feature, GeoJsonSource.Builder.featureCollection or GeoJsonSource.Builder.geometry were applied.
If using runtime styling:
loadStyle(style(Style.DARK) { +geoJsonSource(id) { featureCollection(collection) } ... }
Style.OnStyleLoaded will be emitted without waiting to draw GeoJsonSource.feature, GeoJsonSource.featureCollection or GeoJsonSource.geometry on the map.
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
with the data update call to filter the events) or MapLoadingError
with type = source
if data parsing error has occurred.