Tile URL templates
Shared vector, raster and raster-dem sources support the following address tokens. Relative TileJSON URLs and URL-style basemaps use the same expansion rules:
| Token | Meaning |
|---|---|
| z, x, y | Canonical tile coordinates; tms flips only y |
| -y | Retained explicit inverse-y extension |
| prefix | Two hexadecimal digits from the low four bits of canonical x and y |
| quadkey | Quadtree key from canonical XYZ; empty at zoom0 |
| bbox-epsg-3857 | Canonical west,south,east,north bounds in Mercator meters |
| ratio | @2x when the actual pixel ratio exceeds1, otherwise empty |
const caps = await map.sqs.getCapabilities();
if (caps.commonTileUrlTemplates) {
map.addSource('imagery', {
type: 'raster',
tiles: ['https://tiles.example/{quadkey}{ratio}.png'],
maxzoom: 18
});
}
Wrap token names in braces when using them in URLs. The example illustrates the address form; supply your own working data service. Quadkey-only, bbox-only and fixed addresses are accepted without requiring z/x/y. Mirrors are selected deterministically from canonical x+y. World copies and overzoom preserve canonical coordinates. TMS does not change quadkey, prefix or bbox. Bounds use EPSG:3857 meters rather than longitude/latitude. Unknown tokens, invalid protocols, credentials, control characters and oversized expanded URLs fail while retaining the previous valid data and state.
DPR1.25 and2 both select the high-density address. Only shared sources containing ratio cancel previous work and clear that source's decoded/fallback density when crossing1. Source identity and metadata remain; late replies cannot overwrite new pixels. Templates without ratio retain their cache. The independent URL-basemap path conservatively refreshes session tiles/geometry using its existing generation while preserving styles, images and glyphs. Its density bucket is independent of sprite selection or sprite-download fallback.
commonTileUrlTemplates describes this template family only. Full URL-source metadata parameters, MLT, device/external validation, mobile GIS/iOS and formal releases remain pending. The shared script and local fixture require the repository's controlled gate server. Matching validation results are recorded when completed. Core 16498121bf45c5253114b36ff7d3e65da899a195.
Current tile-template development delivery: core16498121bf45c5253114b36ff7d3e65da899a195, SDK 0.3.0-dev.16498121. The same130 checks and9 observed phases passed in Native, main-thread and Worker hosts atDPR1/2, totaling54 real frames. Three source types share39 actual resource calls; all four browser combinations use111 calls with zero errors. Official30-input/90-world-copy comparisons, common-source/independent-URL CPU cases, actual software Vulkan, workspace/seven-crate wasm boundaries, four metadata cases and the DEM regression passed. Application102/data49 cases, locked check, 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.16498121-tile-url-templates.tar.gz contains642 manifest files plus bundle.json,38267917 bytes,SHA256 178588aaf79866bd387cd9dbef978c0d45015b69bc6f3e38f247c763144d8332; the independent read-only verifier checked every member. Fixed74/MVT/DEM archives remain byte-identical. Bilingual production HTTP and four-repository synchronization are recorded separately. Full source parameters/MLT, devices/external validation, mobile GIS/iOS and formal release remain pending.
Effective tile metadata documents current overrides, actual sizing/DEM decoding and accepted data during refresh waits/failures. Earlier evidence is not relabeled.