addStyleSource

abstract fun addStyleSource(@NonNull sourceId: String, @NonNull properties: Value): Expected<String, None>

Adds a new [style source](https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources). Note: When adding a `geojson` source, this method does not synchronously parse the GeoJSON data. The events API shall be used to make sure the provided GeoJSON data is valid. In case the GeoJSON is valid, a `map-loaded` event will be propagated. In case of errors, a `map-loading-error` event will be propagated instead.

Return

A string describing an error if the operation was not successful, empty otherwise.

Parameters

sourceId

An identifier for the style source.

properties

A map of style source properties.