Weather

weather: the precipitation type at each pixel — rain, snow, freezing rain and so on — as the red channel of the precip-type / precip / temperature source. Matches MapsGL JS conditions.weather.fill, and is what weather-text samples.

The channel holds codes, not amounts, so nothing may blend them: no spatial interpolation, and meld = false so a frame between rain (1) and snow (5) does not read as freezing rain (3). Colors are stepped stops from WeatherType (see weatherTypeStops), each starting half a code below its own, and the draw range runs half a code past either end. The renderer's decoded value lands a hair off the whole number, and with the draw range on the codes themselves rain (1) fell just under it and never drew. Centred bands take either side of the rounding.

One deliberate difference from JS: the draw range stops at the highest real code rather than

  1. 255 is the product's "none", and JS's range would let it draw.

Constructors

Link copied to clipboard
constructor(service: WeatherService)

Properties

Link copied to clipboard
open override val code: LayerCode
Link copied to clipboard
open override val layer: SampleLayerDescriptor

Layer definition for style/render behavior.

Link copied to clipboard
open override var legend: Legend?

Optional legend model synchronized with paint updates when supported by the concrete configuration implementation.

Link copied to clipboard
open override var presentation: Presentation?

An optional presentation object for this layer. The default implementation is null. Classes that have a presentation should override this property.

Link copied to clipboard
Link copied to clipboard
open override val source: EncodedSourceDescriptor

Source definition for tile/data fetching.

Functions

Link copied to clipboard

Applies stroke thickness to a single vector line weather configuration (parity with JS addWeatherLayer(..., { paint: { stroke: { thickness } } })).

Link copied to clipboard

Recurses into composite configs and sets line stroke thickness on every child that is a line layer.