Function disableText3DWorker

  • Disables the Text3D web worker and falls back to processing on the main thread.

    This function should be called when using Text3D features in environments with strict Content Security Policy (CSP) that blocks web workers from being created using blob: URLs or unsafe-eval directives.

    While disabling the worker may slightly impact performance for complex text rendering, it enables Text3D functionality in CSP-restricted environments.

    Ensure calling this before calling preloadFont

    Returns void

    import {disableText3DWorker} from '@mappedin/mappedin-js';
    // Disable Text3D worker for CSP compatibility
    disableText3DWorker();

    // Then use Text3D features as normal
    mapView.Text3D.labelAll();