XYZ Maps Documentation
    Preparing search index...

    Interface WorkerPreProcessorOptions

    Run a single worker processor. For worker followed by main-thread processing, use PreProcessorPipelineOptions.

    interface WorkerPreProcessorOptions {
        execution: "worker";
        options?: Record<string, unknown>;
        processor: string | WorkerPreProcessorFunction | URL;
    }

    Hierarchy (View Summary)

    Index
    execution: "worker"

    Run this preprocessor in the provider's web worker. The processor function must be self-contained; it cannot access closures or main-thread APIs.

    options?: Record<string, unknown>

    Structured-cloneable values available as context.options; an empty object is supplied when omitted.

    processor: string | WorkerPreProcessorFunction | URL

    A standalone function (serialized and reconstructed in the worker) or a URL to a JavaScript module whose default export is the processor function. Receives (input, context), where context.options contains the configured options and context.utils exposes worker-safe helpers such as WorkerPreProcessorUtils.decodeTga. Serialized functions and module loading use dynamic code loading, which may require unsafe-eval and module URLs to be permitted by the Content Security Policy. Cross-origin module URLs must allow worker-origin CORS requests. Receives WorkerPreProcessorInput (data and tile coordinates), not a provider or ready callback; return the processed array or a Promise of it. Utilities include base64 decoding, decompression, and WorkerPreProcessorUtils.decodeTga for preparing ModelTextureData.