MapStyle

class MapStyle

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

Used by com.xweather.mapsgl.weather.WeatherService.loadStyles after the map is available. Icons are registered with keys "$spriteId:$name" (SDF names may use a -sdf suffix in metadata).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
suspend fun loadSprite(id: String, jsonUrl: String, map: ImageRegisteringMap, dpr: Float = 1.0f)

Downloads sprite PNG + JSON, crops each icon, and calls ImageRegisteringMap.addImage for every entry.