Package-level declarations
Types
This is used for the early demo, will not be used in the final product
Sidecar vector source for gridded/symbol layers backed by XweatherEncodedTileSource.
EncodedTileSource.kt
Runtime GeoJSON data source for map layers that consume geographic features (points, lines, polygons).
ImageTileSource.kt
This will be merged with DataSourceEvents
Public entry types for configuring tile/geo sources passed to com.xweather.mapsgl.map.MapController.addSource.
SourceMetadata.kt
An interface for a structure responsible for parsing and decoding tile data into a specific format required for rendering.
TileSource.kt
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
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).