Encoded Grid Vector Tile Source
Sidecar vector source for gridded/symbol layers backed by XweatherEncodedTileSource.
Mapbox requests geometry per tile via requestTile; features are placed on a global Web Mercator world-pixel grid (512×2^zoom) for even screen spacing. Wind uses G/B u/v (atan2(u,-v); sampleFieldsFromEncodedRgb). Maritime *_dir.fill (instancedQuadMonochromeWhite) uses blue-only scalar degrees like JS EXPRESSION_ANGLE (norm * 360 - 180, wrapped to 0–360°).
Constructors
Properties
type in MapsGL JS
Mapbox symbol overlays need timeline meld invalidation so custom-geometry tiles refetch blended icons. Instanced GL wind barbs meld on the GPU (com.xweather.mapsgl.anim.Timeline.dataMeld) and skip this work.
Functions
Adds a map layer as a consumer of the data source.
Used by prepareTileRequest() to increment or decremnet the time and reformate it for sources with time offets
Rebuilds the CPU palette used for instanced wind barb/arrow RGB when SamplePaint.colorScale or SamplePaint.encodedScalarNormMax changes. Safe to call when reusing a cached gridVector sidecar source.
Packed instanced wind barbs: endpoint phase A and B only (no Timeline.dataMeld in sampling). Matches encoded raster layers: the GPU applies dataMeld each frame so timeline crossfade stays smooth without rebuilding this buffer at playback frame rate.
Returns the metadata for the source, which can be loaded from a remote source.
Data inspector for maritime *_dir.fill: bilinear sample at lon/latDeg using the same placement zoom as buildInstancedWindBufferDualPhase (stablePlacementZoomInt\(mapZoom\)), then vector-blend phases like the GPU. Nearest-neighbor tile bytes in EncodedTileLayer do not match instanced sampling.
convert from \"2025-04-22T03:49:31Z\" to 20250422030000
Timeline-only invalidation: keep cached placement geometry, refresh only sampled icon properties.
Same feature generation as the Mapbox sidecar path, merged for OpenGL instanced drawing (no Mapbox vector layer).
Removes a map layer as a consumer of the data source.
JS GridPaint.spacing is in logical px; instanced gridded placement uses authored × density × 0.5 (same density convention as com.xweather.mapsgl.renderers.GridLayerRenderer icon sizing). Safe when reusing a cached sidecar: bumps spacing and invalidates placement caches when the effective value changes.