Shared style registry and resources
When a matching SDK reports commonPlanarLayerComposition:true, the shared Mercator view with zero pitch/roll and no terrain/extrusion combines media, backgrounds, labels, heat and supported static line/fill effects in complete layer order. This capability supersedes earlier media-combination exclusions only within that shared planar scope. Custom line animation, tilted/globe/terrain views and other unsupported material combinations retain their respective limits. Reordering and compatible diff preserve identities, caches, pending requests and fade clocks; material, geometry and texture budgets are validated before publication. See planar layer composition.
The same object/URL script passes58 checks on Linux native, browser main thread and Worker, including actual glyph, gradient and circle pixels. The matching development SDK is 0.3.0-dev.b825d564. The task list separately tracks the full style specification, device acceptance and formal release.
map.setStyle accepts a version 8 style object or a reachable style JSON URL. Both entries prepare the same candidate source and layer registry. After a successful replacement, their public IDs can be used with source/layer handles, paint, layout, filters, ordering, feature state and queries. Loading a URL does not draw a second copy of the same basemap.
import {map} from 'sqsmap';
map.setStyle('https://example.com/maps/style.json', {diff: false});
await map.sqs.flush({render: true});
// flush is a command/frame barrier. Observe loaded or loading events for resources.
const ready = await map.loaded();
const sourceReady = await map.isSourceLoaded('places');
const places = await map.getSource('places');
if (ready && sourceReady && places) {
map.setPaintProperty('places-circle', 'circle-color', '#0066ff');
await map.sqs.flush({render: true});
}
The current development interface attempts atomic incremental updates when diff is omitted or true; diff:false fully replaces. See incremental style updates. Full replacement invalidates previous source handles and layer identities; compatible diff updates retain them. Pending documents keep the previous map and invalid candidates preserve the registry. Stage64 evidence retains its original core commit; the separate whole-transaction script provides stage67 incremental acceptance.
Relative source URLs, GeoJSON data, tiles, glyphs and sprite URLs resolve against the actual document URL. Supply full resource URLs in an object style. Glyph URLs retain the {fontstack} and {range} templates. Sprite JSON/PNG belong to the same provider; provider arrays follow the existing convention. Resource downloads and image/glyph caches belong to the current style generation. Cancellation and late responses cannot overwrite a subsequent style.
style.load means the document and registry replacement committed. It does not by itself mean that all online sources, sprites or PBF glyphs are visible. map.loaded() also considers pending documents, source/resource requests, glyph/image revisions and pending rendering. Hosts must continue servicing resources and rendering; native hosts must drain events to avoid backpressure. A script may use bounded flush({render:true}) calls and readiness queries. A single flush does not complete all network resources.
The registry reuses the existing background, fill, line, circle, symbol, heatmap, fill-extrusion, raster, hillshade and color-relief types. A unified registry does not expand their expression or rendering combination limits. For example, visible line-gradient combined with raster/DEM media still has renderer restrictions; hide layers with unsupported combinations before entering a media phase. Transitions, unknown root properties and unsupported operators or combinations continue to fail explicitly.
Existing core budgets remain: 4 MiB per style JSON or PBF glyph response; 1 MiB sprite JSON and 8 MiB sprite PNG; at most eight sprite providers; 128 sources and 128 layers; and 64 shared visible tiles. GeoJSON, raster and DEM obey their own request maxBytes and existing geometry/image/terrain budgets. The style document limit is not a limit for every resource. Browser resources must also satisfy the actual CORS and host protocol conditions.
The portable object/URL script uses localhost resources for acceptance; replace them with your own reachable addresses. Its visibility phases stay within the existing supported combinations. It does not promise simultaneous rendering of all registered types or a formal cross-platform release.
Existing website themes, map.basemap.load and MapView.setStyleBasemap retain the separate compatibility basemap compiler. Their existing theme rendering does not imply full external style-specification support in the shared registry entry.
Query this shared registry subset with (await map.sqs.getCapabilities()).commonStyleRegistry.