Expressions inside arrays
['semiliteral', elements] evaluates each array element in order and returns an array. literal preserves nested values unchanged. Elements may use get, let/var, global-state or paint feature-state. Wrap object and literal array elements in literal, or use another semiliteral for nested evaluated arrays.
map.setPaintProperty('places', 'circle-color',
['to-color', ['semiliteral', [0, 0, ['get', 'blue'], 1]]]);
map.setPaintProperty('places', 'circle-radius',
['at', 0, ['semiliteral', [['get', 'radius'], 2]]]);
await map.sqs.flush({ render: true });
Shared GeoJSON/MVT paint, query/layer filters and permitted text layout reuse the evaluator. Field, feature-state and global-state dependencies traverse the list container and refresh normally. feature-state remains paint-only; zoom keeps its outer step/interpolate rule. Cluster expressions must still return a non-null scalar and cannot depend on global state.
Validation limits 1024 nodes/32 levels; evaluation limits 8192 steps/64 levels. Element errors abort the whole array. Empty arrays are valid. The independent URL basemap compiler does not yet support this expression. Native-library QuickJS and browser main-thread/Worker run the same script; device acceptance and formal release remain separate.
Portable acceptance script. Syntax follows the MapLibre semiliteral specification; the Rust implementation is independently developed.