Weather Service
High-level factory/service for MapsGL weather products and source descriptors.
WeatherService centralizes:
account-aware authentication (authenticator) for MapsGL/AMP requests,
sprite/style bootstrapping via loadStyles,
optional product metadata loading via loadLayerMetadata,
construction of source descriptors for raster, encoded, vector, AMP vector, and GeoJSON endpoints,
and convenient static product builders in the companion object (for example Temperatures, Radar, RoadMotorway).
Typical flow:
Create service with XweatherAccount.
Call loadStyles once the map object is available.
Build weather layer configurations (for example through companion product functions).
Register resulting sources/layers with
MapController.
See also
Types
Product builders matching LayerCode entries (for example Temperatures, Radar).
Properties
Account credentials used to sign and build weather API requests.
Shared request authenticator used by descriptor factories that require MapsGL auth.
true when loadStyles completes with no sprite generation/download failures.
Sprite/style loader used by loadStyles.
Functions
Fetches user-facing weather product metadata from layerMetadataURLPath.
Loads SDK sprite sheets and registers generated fallback assets used by weather symbol layers.
Creates an AMP vector source descriptor for a weather product code using default id format wx::<code>.
Creates an AMP vector tile source descriptor.
Creates an encoded source descriptor from a grouped dataset definition.
Creates a MapsGL encoded source descriptor for one or more encoded datasets.
Creates a GeoJSON source descriptor for an Xweather Data API route.
Creates a raster source descriptor for a weather product code using default id format wx::raster.<code>.
Creates a raster image source descriptor for tile-based weather imagery.
Creates a vector source descriptor for a weather product code using default id format wx::<code>.
Creates a MapsGL vector tile source descriptor.