Package-level declarations
Types
This is used for the early demo, will not be used in the final product
Runtime data provider backing one or more com.xweather.mapsgl.layers.tile.MapLayer instances.
Sidecar vector source for gridded/symbol layers backed by XweatherEncodedTileSource.
GPU uniform values for encoded-tile UV math (512 data + border padding in a square texture). Keep in sync with DataPool; fragment shaders read these via com.xweather.mapsgl.gl.programs.TriangleProgram.
EncodedTileSource.kt
Runtime GeoJSON data source for map layers that consume geographic features (points, lines, polygons).
ImageTileSource.kt
This will be merged with DataSourceEvents
Result of an internal tile request: either new Data or a signal that the tile is already cached.
Public entry types for configuring tile/geo sources passed to com.xweather.mapsgl.map.MapController.addSource.
SourceMetadata.kt
Decodes raw HTTP bytes into a typed TileData subclass for a given source.
Base DataSource for tiled products: URL templates, zoom range, metadata, and a TileRequestManager.
Runtime vector tile source created by com.xweather.mapsgl.map.MapController.addSource when using com.xweather.mapsgl.sources.source.spec.VectorSourceDescriptor. Obtain via com.xweather.mapsgl.map.MapController.getSource and cast to this type to change TileSource.tileURL, TileSource.minZoom / TileSource.maxZoom, or refresh tiles.
Geographic rectangle in degrees (WGS84), same convention as Mapbox camera bounds.
XweatherEncodedTileSource.kt
Properties
Alias for DataSource.kind (matches JS naming type).
Functions
Calculates the geographic latitude/longitude bounding box for a given tile.
Checks if a polygon's vertices are in counter-clockwise (CCW) order. Assumes longitude as x and latitude as y. Conventionally, a positive signed area from the shoelace formula indicates CCW.
Reverses the list if its winding order is clockwise. Useful for ensuring a polygon ring is counter-clockwise (e.g., GeoJSON outer rings).
Reverses the list if its winding order is counter-clockwise. Useful for ensuring a polygon ring is clockwise (e.g., GeoJSON inner rings/holes).