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.

Shared point symbol collision and ordering

Planar symbols now support default collision placement. icon-allow-overlap and icon-ignore-placement accept boolean constants or expressions, defaulting to false. icon-padding accepts constants or numeric expressions in0..128 CSS pixels,default2. The first controls checking occupied space;the second controls blocking later symbols. MultiPoint positions are placed individually,and queries inspect placed points only. Hidden,missing-image,zero-alpha and offscreen symbols occupy no space. Omitting icon-image leaves an empty layout;setting it to null restores that empty layout.

symbol-sort-key accepts finite numbers or numeric attribute/zoom expressions. Ascending keys determine placement/drawing priority. symbol-z-order accepts auto/source/viewport-y,default auto. Without a sort key,auto/viewport-y draw by screenY when overlap is true or ignore-placement is false;source retains input drawing order. Upper common layers get placement priority. Queries follow actual icon drawing order. These parameter semantics follow the MapLibre symbol specification;the implementation reuses this engine's existing collision grid.

import {map} from 'sqsmap';
map.addLayer({id:'icons',type:'symbol',source:'points',layout:{
 'icon-image':['get','icon'],'symbol-sort-key':['get','rank'],
 'icon-padding':2
}});
await map.sqs.flush({render:true});
map.setLayoutProperty('icons','icon-allow-overlap',true);
map.setLayoutProperty('icons','symbol-z-order','viewport-y');
await map.sqs.flush({render:true});

Register the actual icon/rank fields and images first,or complete missing images in a listener. Invalid numeric sorting values reject;layout still rejects feature-state while paint supports it. Camera,viewport and actual style-density changes trigger placement without replacing source/layer identities. Contiguous identical icon draws batch GPU submission;MultiPoint splitting does not copy the entire point-index list. Each map owns at most16384 image points;the32-pixel grid uses at most64 buckets per box and1M comparisons. Failed candidates do not apply partial placement.

This stage covers common planar point-image layers. URL basemap labels use a separate layout domain;cross-domain collision remains pending. commonPointIconCollisions is true;commonAndURLSymbolCollisions is false. Text and joint image/text collision are connected; line placement, other parameters/3D combinations, mobile GIS integration and devices remain pending. The complete HTML contains every handler for12 controls. The portable script covers placement,ordering,queries,zoom and layout reset. Example points/images are generated locally.

08.38: allow-overlap/ignore-placement/optional accept boolean expressions; icon/text padding accepts numeric expressions in0..128. Policies evaluate per feature. Shared dynamic auto ordering scope is documented in the policy guide.