@maplibre/native-ffi
    Preparing search index...

    Class RenderSessionHandle

    A render session, which renders one map to one render target.

    See mln_render_session in the C API reference.

    Hierarchy

    • Owner
      • RenderSessionHandle
    Index
    "[asyncDispose]": () => Promise<void>

    Calls dispose(), for await using. Hosts without Symbol.asyncDispose, such as ArkTS, leave it undefined.

    "[dispose]": () => void

    Calls dispose(), for using. Hosts without Symbol.dispose, such as ArkTS, leave it undefined.

    id: bigint

    The native handle ID, which runtime events report as their source. It stays readable after close.

    • Ends every frame demand that has not started with MLN_RENDER_RESULT_NO_UPDATE and completes after earlier driver work has finished. A running demand finishes its attempt and ends any wait for a map update or a free slot. After completion, a new frame demand is required to render again.

      See mln_render_session_barrier in the C API reference.

      Returns Promise<void>

    • Retires a detached or abandoned session handle. The call is CPU-only and may run on any native thread, including from one of the session's own completions. If an abandonment is still in progress on another thread, this waits for it to finish before consuming the session owner.

      See mln_render_session_release in the C API reference.

      Returns void

    • Starts a feature-extension query against the latest driver state. The completion borrows one mln_buffer_view holding UTF-8 JSON (value_count 1), valid only for the callback.

      See mln_render_session_query_feature_extensions in the C API reference.

      Parameters

      • sourceId: string
      • feature: string
      • extension: string
      • extensionField: string
      • OptionalargumentsValue: string

      Returns Promise<string>

    • Starts an ordered logical resize of the driver and the map. The driver applies the extent in order with its other work, and later driver work does not wait for the map. The completion runs after both have applied it and the map has published its snapshot. Frames render once a map update matches the applied extent; static and tile maps publish that update for their next still image.

      See mln_render_session_resize in the C API reference.

      Parameters

      Returns Promise<CommandCompletion>

    • Services every queued item for a caller-graphics-thread driver. The first successful service call fixes the session's graphics-thread identity; later calls from another native thread return MLN_STATUS_WRONG_THREAD. The target context must be current. Core-worker sessions return MLN_STATUS_INVALID_STATE.

      See mln_render_session_service_driver_work in the C API reference.

      Returns void