Skip to main content

Shared custom-protocol plans and tiles

Shared resource planning accepts HTTP(S) and valid hierarchical custom-protocol addresses, retaining their real URI. Capability customResourcePolicyPlans is true. Planning is read-only: it neither registers handlers nor performs IO.

const plan = await map.sqs.resources.plan({
 url:'memory://tiles/0/0/0.png',resourceType:'Tile',maxBytes:4096
});
// Original URI, deadlines, byte/concurrency budget; zero retries/no-store.
map.addSource('tiles',{type:'raster',
 tiles:['memory://tiles/{z}/{x}/{y}.png'],tileSize:256});
map.addLayer({id:'imagery',type:'raster',source:'tiles'});

Shared vector/raster/raster-dem tiles templates and setTiles use the same validation. Style URL, glyph and standalone loadImage retain their scope;13.6c extends TileJSON/GeoJSON/image/video source entries. URLs require a host and no embedded credentials. Scheme names use1..32 characters, begin with a letter and may contain digits/+/./-. Reserved HTTP/WebSocket/local/execution schemes cannot be overridden.

Custom plans retain total/attempt deadlines, concurrency and byte limits. RetryOn flags are false, retries/retryDelayMs are zero and cache is no-store. HTTP retries/fallbacks are not automatically applied to custom callbacks. Handlers own internal networking, caching and authorization. Ordinary HTTP retains its policy. The SDK executor follows the captured plan's retry/cache settings.

Standalone web SDK handlers register via addProtocol in the same JavaScript realm. Main-thread functions are not transferred to Workers; Worker hosts register before serveMapWorker, sharing that realm's registry. The workbench sqsraster HTTPS placeholder planner is removed: actual custom URLs use the core planner. Spatial-engine tasks remain host-owned and never enter the map core.

Native C hosts poll the existing resource queue, read requestPlan and deliver encoded bytes through resource_response with original generation/id. Budgets, cancellation and decoder ownership remain. Native QuickJS/common scripts still provide no addProtocol callback registration; this stage does not claim three-platform function transfer.

The portable script has nine identical native/main-thread/Worker checks. The actual page renders custom PNG tiles. Native C and browser runs retain actual red-pixel evidence. Mobile GIS/iOS, devices and formal release remain separate acceptance. Applications own UI, data sources and applicable attribution.

13.6c supports custom GeoJSON/TileJSON/georeferenced image/video source URLs and updates, retaining decoder/cancellation/identity rules. See source protocols; Style/glyph/loadImage/live entries retain their own scope.

Retained native script callbacks are connected; cross-Worker application script forwarding and the default desktop downloader remain separate tasks.