Line progress and gradients
When a matching SDK reports commonPlanarLayerComposition:true, the shared Mercator view with zero pitch/roll and no terrain/extrusion combines media, backgrounds, labels, heat and supported static line/fill effects in complete layer order. This capability supersedes earlier media-combination exclusions only within that shared planar scope. Custom line animation, tilted/globe/terrain views and other unsupported material combinations retain their respective limits. Reordering and compatible diff preserve identities, caches, pending requests and fade clocks; material, geometry and texture budgets are validated before publication. See planar layer composition.
Core e62b861d is implemented and pushed;3 CPU cases, the same final actual GPU and targeted WASM checks passed. The same32 checks and actual pixels passed native/main/Worker; matching development SDK archive was generated and checked file by file. Capability commonLineGradients enables line-gradient on shared planar GeoJSON lines. The source must explicitly set lineMetrics:true; the previous limited native gradient channel remains separate.
import { map } from 'sqsmap';
map.addSource('route', {type: 'geojson', lineMetrics: true,
data: {type: 'Feature', id: 1, properties: {}, geometry: {
type: 'LineString', coordinates: [[116.38,39.9],[116.4,39.9],[116.4,39.92]]
}}
});
map.addLayer({id:'route',type:'line',source:'route',
layout:{'line-cap':'round','line-join':'miter'},
paint:{'line-width':8,'line-opacity':0.7,
'line-gradient':['interpolate',['linear'],['line-progress'],
0,'#0000ff',1,'#00ff00']}
});
await map.sqs.flush({render:true});
The design requires progress from original Mercator path distance, without restarting at0 after viewport clipping, zoom, translation or DPR changes. Each original MultiLineString part normalizes independently to0..1; a closed LineString starts at0 and ends at1, allowing a color seam. Official GeoJSON worker/geojson-vt observable behavior was checked without copying code. Candidate ramps allow at most32 step cuts/33 bands and257 RGBA8 samples per nonzero band. A cut selects its right band, preventing sampling across a step. Existing color evaluation, curves and LAB/HCL remain supported; within-band linear sampling and8-bit quantization introduce error, without a pixel-identity claim.
The implemented batch includes LineString/MultiLineString, legal step/interpolate/color/type/lexical/lazy/global expressions, dynamic width/opacity, filtering/sorting and stable cap/join/offset/translate. Gradient selection itself does not read feature properties or feature-state. Gap/blur, dash/pattern/animation, MVT/3D/globe/media combinations remain unsupported. Ramps/textures, actual vertices and draw records must count toward the existing joint static-pattern/animation allowance; candidate ramp evaluation totals at most two-million estimated nodes; joint static-pattern/animation32 layers/4096 paths/100000 actual vertices/256MiB and ten-million CSS distance per path are retained. Final frozen accounting uses 24-byte actual vertices; RGBA32Float band-color and metadata textures each round up to 64KiB pages, plus a 48-byte uniform/256-byte binding reserve and 64 bytes per path draw, all within the joint resident/candidate allowance. Each path allows 5000 original nodes; triangle-pair stability checks across all parts of one original feature allow two million per candidate layer.
Three CPU cases and the same final actual GPU passed. The initial WGSL reserved-local-name failure is retained; renaming that local passed the same case. Public three-path32 and actual pixels passed; matching development SDK archive was generated and checked file by file. Mobile GIS/iOS/devices, external platforms, remaining styles, formal release/deployment remain pending. Semantics reference the official gradient specification and lineMetrics, implemented independently without MapLibre code.
Multipart/closed behavior was checked against the official worker and official GeoJSON conversion observable contracts, without using their code.
Actual expression domain: line-progress is accepted only as direct step/interpolate input, including legal let aliases. Other progress arithmetic or progress-dependent conditional jumps reject to avoid filtering across unrecognized discontinuities. Uniform color branches, existing curves/LAB/HCL and lexical/global evaluation remain. Core scope is frozen; public32 passed; matching development archive was checked.
Queries preserve original source/ID, filtering/sorting and conservative true-topology/offset/translate bounds. Partial transparency can still hit; fully transparent ramps and width/opacity0 do not. Stable true topology is checked jointly across all parts of each original feature; self-crossings, reversals, unstable or overlapping coverage reject, while different features compose in normal sorted order. line-color and its alpha neither tint nor hide gradients. Source/state/global/paint/camera/viewport/DPR/output/resource candidates validate before publication, retaining old state/frame/queue/identity on failure. Previous native effects gradient APIs remain separate.
Current development archive SqsMap-SDK-0.3.0-dev.e62b861d-resumed.tar.gz: 555 manifest files plus bundle.json, 36815454 bytes, SHA-256 0ebfea63108b1988ab43f1c07c7a62d7bf62c523cf5c5286b0df2ebd856137bc. All member sizes/SHA and 24 recent portable scripts were compared byte-for-byte; this is not formal release or device acceptance.