add Weather Layer
Adds a weather layer from a LayerCode preset (source + descriptor + paint from service).
Return
The primary new TileLayer, or null if configuration is invalid.
Parameters
layer Code
Built-in or configured weather product.
id
Optional stable id prefix; composite children get derived ids.
before Id
Optional existing layer id to insert below in the stack.
fun addWeatherLayer(config: WeatherConfiguration, id: String? = null, beforeId: String? = null, isCompoundLayer: Boolean = false): TileLayer?
Adds a weather layer from an explicit WeatherConfiguration (use when you built the config from WeatherService factories instead of LayerCode).
Return
The primary new TileLayer, or null if the configuration cannot be applied.
Parameters
config
Source + layer descriptor + optional legend; composites recurse into sub-configs.
id
Optional id prefix for the new layer(s).
before Id
Optional insertion anchor in the layer stack.
is Compound Layer
Internal flag when recursing for composite layers.