Effective tile metadata and DEM encoding
Shared vector, raster and raster-dem sources distinguish declarations from accepted metadata. source.sqs.getTileMetadata() returns effective fields used by actual tile levels, DEM decoding, attribution and queries. getStyle() retains the caller's declaration without writing remote values into user configuration.
| Field | Resolution order |
|---|---|
| minzoom,maxzoom,bounds,scheme | Explicit declaration → valid present remote field → current accepted value or default |
| Raster/DEM tileSize | Same order;256 and512 supported, including integral JSON256.0/512.0 |
| attribution | Explicit declaration, including empty text → supplied remote value → current value; HTML is still cleaned |
| DEM encoding | Explicit declaration → supplied remote value → current value or mapbox |
map.addSource('dem', {
type: 'raster-dem',
url: 'https://tiles.example/dem.json'
});
const source = await map.getSource('dem');
await map.sqs.flush({render: true});
const effective = await source.sqs.getTileMetadata();
if (effective.metadataLoaded) {
console.log(effective.tileSize, effective.encoding);
}
The example illustrates the form; supply a working service. Remote256-pixel sizing changes actual requested tile levels. Remote terrarium encoding really selects Terrarium decoding rather than the declaration's Mapbox default. Custom factors come from source declarations and existing defaults; no remote-factor extension is invented. Invalid supplied remote fields are rejected even when an explicit option would override them, retaining previous valid data.
setTiles replaces addresses while preserving other effective metadata, TMS and DEM encoding. During setUrl waits/failures, accepted pixels, terrain and original vector-query records remain available. A data epoch switches only after metadata is accepted; previous records cannot masquerade as the new query epoch. Exact new tiles restore content. Existing retiring labels follow their placement-history contract. Source identity remains and late replies are ignored. SqsMap retains its existing mutually exclusive url/tiles address-switching rule; this is not the full official setTiles lifecycle that retains and requests a URL again.
metadataLoaded means accepted metadata exists, not that the current refresh finished. Inspect loading,loaded and loadError in getSourceInfo for the current request. Failure can retain visible data while remaining unsuccessful. With terrain enabled, elevation queries include exaggeration and prefer the current accepted surface in view.
commonTileMetadataResolution describes this bounded scope only. MLT, other full source parameters/metadata, complete style/3D coverage, mobile GIS/iOS, device/external validation and formal release remain pending. The shared script and local fixture require the repository's controlled gate server. Core 8fc51305dd67f3b0a18381ccb90ba73b8a6337f7; matching acceptance is recorded when completed.
flush confirms commands/rendering without waiting for all network content. If metadataLoaded is initially false, read again after the source's sourcedata/metadata notice. Inspect error notices and loadError for failed refreshes.
Current effective-metadata development delivery: core8fc51305dd67f3b0a18381ccb90ba73b8a6337f7, SDK 0.3.0-dev.8fc51305. The same58 checks and13 observed phases passed in Native, main-thread and Worker hosts atDPR1/2, totaling78 real frames. Actual20-resource sequences match; all four browser hosts use137 calls, with zero final cancellations/unexpected errors under recursive Worker instrumentation and three explicitly verified expected source failures. Integrated CPU/actual software Vulkan, workspace/seven-crate wasm boundaries and affected metadata/refresh/URL/DEM regressions passed; eight pinned official-loader observations retain their source SHA. Application102/data49 cases, locked check and matching Native/core/application WASM and Android API24 ARM64/JNI are complete; the233-entry script-contract WASM retains its bytes. Archive SqsMap-SDK-0.3.0-dev.8fc51305-metadata-resolution.tar.gz has649 manifest files plus bundle.json,38292708 bytes,SHA256 1ba4205f34aee57579b288a4c14763ded44bc8c55658d98101de364b55aaa24b; the independent read-only verifier checked every member. Fixed74/MVT/DEM/template archives retain their SHA. Bilingual HTTP and four-repository synchronization are recorded separately. MLT/other full metadata, device/external validation,mobile GIS/iOS and formal release remain pending.