Skip to main content

A matching development SDK with commonLineSymbols also supports shared planar line symbols, including true per-glyph curved geometry, target ownership, joint icon/text groups and shared budgets. Earlier point-only scope and pending line-symbol notes below are superseded for this bounded subset. Complex shaping, tilted/globe/terrain placement and complete road stitching remain pending.

Icon layout expressions

Shared symbol icon-size and icon-rotate now accept numbers or attribute/lexical/global-state expressions. Size is0..16; rotation is-360..360 degrees. Zero size draws nothing and generates no missing-image demand for that feature.

map.addLayer({id:'stations',type:'symbol',source:'stations',layout:{
 'icon-image':'marker',
 'icon-size':['number',['get','size'],1],
 'icon-rotate':['number',['get','heading'],0]
}});
await map.sqs.flush({render:true});
map.setLayoutProperty('stations','icon-rotate',['number',['global-state','heading'],0]);
map.setGlobalStateProperty('heading',90);
await map.sqs.flush({render:true});

Data/global-state updates rebuild actual symbol instances. Drawing, collision and queryRenderedFeatures use the same rotated footprint while source/layer identities remain stable. Layout rejects feature-state, which remains paint-only. Invalid results reject the candidate, rather than clamping or replacing expressions with constants. Zoom follows existing shared-layout evaluation; full MapLibre integer-zoom layout policy remains to be unified.

Anchor, image pixelRatio, ordering, paired text and optional components retain their existing rules. icon-padding remains constant; offsets, line placement and full formatted types are separate tasks. Independent URL basemaps use a separate implementation scope.

Portable script covers actual native-library QuickJS and browser main-thread/Worker attribute/global size/rotation, zero hiding and identity. Devices/external machines remain separate acceptance work.

08.39 aligns shared symbol integer layout zoom and fractional paint zoom; see the layout zoom rule.

Typed image values and availability-aware coalesce/let-var are available; see icon image expressions. Plain/empty strings, RGBA/SDF parameters and queries retain their existing semantics.