SDK JS
    Preparing search index...

    Interface UnifyLayersOptions

    Options for unifyLayers.

    interface UnifyLayersOptions {
        budgetBytes?: number;
        label?: string;
        map?: Map$1;
        maxShadowCasters?: number;
        offscreenFloor?: number;
    }
    Index

    Properties

    budgetBytes?: number

    Total resident-memory ceiling in bytes, shared across ALL members. Omit to leave every member on its own default, which is the behaviour this exists to fix.

    Divided by what is in view, not by member count — see UnifiedLayer.reallocate.

    label?: string

    Display name, e.g. in a settings panel header. Defaults to 'unified'.

    map?: Map$1

    The map, so the group can reallocate as the camera moves. Without it the group still fans out and merges — it just cannot govern memory, because it never learns where you are looking.

    maxShadowCasters?: number

    Most members that may cast shadows at once. Default 8.

    In-view is the right gate for MEMORY — an off-screen suburb holds nothing. It is not enough for shadows, because at a city-wide zoom every member is in view at once, and the cascade reach is 12 km by default, wider than most cities. Wellington's 57 suburbs all qualify, and the shadow pass draws each one's resident tiles into every cascade.

    So the count is capped outright, nearest-to-the-view-centre first. Shadows are a local effect — what reads is the geometry around you — and a hard cap is what makes the cost independent of how finely a publisher happened to slice their city. Ten campus areas never hit it; 57 suburbs do, which is exactly the difference between the two behaving the same way.

    offscreenFloor?: number

    Minimum share a member is left holding when it is off screen, as a fraction of an equal split. Default 0.05. Not zero on purpose: a member evicted to nothing has to re-stream from cold the instant it re-enters frame, which turns a pan into a stutter. A small floor keeps its coarsest levels resident so it comes back immediately.