Package-level declarations

Types

Link copied to clipboard

Host hook for registering bitmap images with the map (Mapbox addStyleImage–style workflow).

Link copied to clipboard
abstract class MapController(val mapView: MapView, val account: XweatherAccount) : ViewModel, MapProvider, DefaultLifecycleObserver, TileLayer.TileLayerEventListener, ComponentCallbacks2, OnMapClickListener

Bridge between the host map view (Mapbox MapView) and MapsGL: sources, tile layers, timeline, data inspector, legends, and weather APIs.

Link copied to clipboard

Lifecycle and interaction callbacks for objects attached to the map pipeline (layers, controls, etc.).

Link copied to clipboard
data class MapLoadProgress(val total: Int, val completed: Int = 0, val failed: Int = 0, val cancelled: Int = 0)

Load progress for map data sources, exposed on MapController.onLoadProgress. Top-level type so host apps (including AAR consumers) resolve total / completed reliably; internal queue state still uses Queue.Progress.

Link copied to clipboard
data class MapsGLLayerError(val reason: MapsGLLayerError.Reason, val layerCode: String?, val layerId: String?, val message: String, val cause: Throwable? = null)

A layer that could not be added, or could not draw, reported on MapController.onLayerError (and MapController.onLayerErrorValue for flow collectors).

Link copied to clipboard
class MapStyle

Loads MapsGL / Mapbox-style sprite sheets (JSON + PNG) and registers each icon on a map.

Link copied to clipboard
data class MaskLayer(val layer: TileLayer, val code: LayerCode, var count: Int = 0)

Adds a mask layer of the specified type if not already present, or increments its reference count if it is. This function should be called from the main thread if it involves UI/map updates.

Link copied to clipboard
class MaskUtils
Link copied to clipboard
data class MeasurementUnits(val temperature: UnitTemperature, val temperatureDelta: UnitTemperature, val speed: UnitSpeed, val distance: UnitLength, val snowfall: UnitLength, val precipitationRate: UnitLength, val rate: UnitSpeed, val intensity: UnitRadarReflectivity, val concentration: UnitConcentrationMass, val ratio: UnitProportion, val duration: UnitDuration, val height: UnitHeight, val length: UnitLength, val none: Dimension, val heightDifference: UnitHeightDifference, val pressure: UnitPressure, val time: UnitDuration)

Describes the unit set used to format map/legend values across various measurement types.

Link copied to clipboard
data class SpriteImage(val x: Int, val y: Int, val width: Int, val height: Int, val pixelRatio: Double)

Sub-rectangle of a sprite sheet for one icon, parsed from the sprite JSON metadata.

Functions

Link copied to clipboard
fun addMaskLayer(type: MaskLayerKind, service: WeatherService, mapController: MapController, map: MapboxMap, beforeId: String? = null): TileLayer?
Link copied to clipboard