Text anchor, justification and case expressions
Shared symbol text-anchor, text-justify and text-transform accept string constants or expressions returning strings, allowing feature attributes and global style state to control layout.
map.setLayoutProperty('labels', 'text-anchor', ['get', 'anchor']);
map.setLayoutProperty('labels', 'text-justify', ['get', 'justify']);
map.setLayoutProperty('labels', 'text-transform', ['get', 'transform']);
map.setGlobalStateProperty('labelAnchor', 'left');
map.setLayoutProperty('labels', 'text-anchor',
['string', ['global-state', 'labelAnchor']]);
await map.sqs.flush({render:true});
Anchors include center and eight directions; justification accepts auto/left/center/right; case transformation accepts none/uppercase/lowercase. Auto justification follows the actual anchor. Transformed text drives glyph layout. Attribute and global-state updates refresh drawing, collision and query footprints together while retaining source/layer identity. Invalid result types or enumerations reject the candidate mutation.
Existing text, atlas and expression budgets remain. Layout still rejects feature-state. Line placement, formatted text, complex shaping, independent URL-domain and other unsupported layouts and independent URL-basemap expression scope remain separate work. Portable script. Seven identical checks pass in native QuickJS and browser main-thread/Worker, with actual glyph pixels; mobile devices, other machines and formal release remain separate acceptance.
08.39 aligns shared symbol integer layout zoom and fractional paint zoom; see the layout zoom rule.