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.

Point image symbols

Standard symbol layers now support planar Point/MultiPoint and MVT points. Register RGBA8 images with addImage or use an already loaded sprite. icon-image accepts a name or attribute expression; icon-size is0..16 and icon-rotate is-360..360 degrees, each accepting a number or attribute/lexical/global-state expression,and icon-anchor supports nine standard anchors. icon-opacity uses common paint expressions,state and zoom. Visibility,ordering,filters and zoom ranges use the shared layer API. setLayoutProperty edits these layouts. Updating/removing images refreshes rendering and queries without replacing layer identity.

import {map} from 'sqsmap';
map.addImage('marker',{width:40,height:20,
 data:Array.from({length:800},()=>[255,0,0,255]).flat()},{pixelRatio:2});
map.addSource('points',{type:'geojson',data:{type:'Feature',id:1,
 properties:{icon:'marker'},geometry:{type:'Point',coordinates:[0,0]}}});
map.addLayer({id:'icons',type:'symbol',source:'points',layout:{
 'icon-image':['get','icon'],'icon-allow-overlap':true,'icon-ignore-placement':true
},paint:{'icon-opacity':1}});
await map.sqs.flush({render:true});
map.setLayoutProperty('icons','icon-rotate',90);
await map.sqs.flush({render:true});

Shared point collision is available, with overlap and ignore-placement defaulting to false; explicit true controls overlap and occupied space. See symbol collision. Plain/formatted text-field and SDF recoloring are available; line placement and other undeclared layout properties remain pending. Layout rejects feature-state; use state in paint. Missing images,zero size or zero opacity have no rendered hits. Queries use actual dimensions,pixelRatio,rotation and anchor footprints;transparent image areas currently use rectangular footprints. Each map owns at most16384 image points including hidden layers;the atlas retains the2048-edge and existing image budgets.

Planar rendering is supported;pitch,globe and common raster combinations reject explicitly. This is a symbol subset,not full symbol compatibility. commonPointIconSymbols is true;the mobile host is pending. The complete HTML includes update,rotation,anchor,opacity,visibility,image removal/restoration,order,query and disposal handlers. The portable script uses the common map API. Example points/images are generated locally;retain source attribution for real data and basemaps.

08.37: Shared icon-offset accepts x,y constants/array expressions in logical pixels, multiplied by actual icon-size and rotated with icon-rotate. Icon-anchor accepts string expressions for nine anchors. Attribute/global-state updates refresh drawing, collision and queries. Offset guide.

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.