@honua/sdk-js
    Preparing search index...

    Interface LoadMapPackageFromIdOptions

    interface LoadMapPackageFromIdOptions {
        allowInvalid?: boolean;
        applyInitialView?: boolean;
        cache?: false | MapPackageFetchCache;
        client: HonuaClient;
        disableDefaultStyleRefResolver?: boolean;
        headers?: HeadersInit;
        maxAgeMs?: number;
        now?: number | Date;
        offlineRegion?: LoadMapPackageOfflineRegion;
        onEvent?: HonuaRuntimeEventListener;
        popupFactory?: PopupFactory;
        popupRenderer?: PopupRenderer;
        requireStyleRefResolution?: boolean;
        resolvePath?: MapPackagePathResolver;
        resolveSource?: SourceResolver;
        resolveStyleRef?: StyleRefResolver;
        resolveTheme?: ThemeResolver;
        signal?: AbortSignal;
        skipCompatibilityCheck?: boolean;
        sourceErrorPolicy?: SourceErrorPolicy;
        styleSpecValidationMode?: RuntimeStyleSpecValidationMode;
        telemetry?: HonuaRuntimeTelemetry;
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowInvalid?: boolean
    applyInitialView?: boolean

    When true, apply pkg.initialView to the map immediately after load. Defaults to true.

    cache?: false | MapPackageFetchCache
    client: HonuaClient

    Active HonuaClient; used for protocol adapter binding.

    disableDefaultStyleRefResolver?: boolean

    Disable the default /ogc/styles StyleRef resolver. When true and no resolveStyleRef callback is supplied, style refs without an inline body are left unresolved (composition then errors on them).

    headers?: HeadersInit
    maxAgeMs?: number
    now?: number | Date

    Serve the named style sources from a persisted offline region.

    The handler comes from @honua/sdk-js/offline because it is bound to one region manifest, one store, and one authorization scope — none of which the runtime can invent. When sourceIds are given the composed style's tile templates are rewritten onto offline-region:// before map.setStyle, and a source that cannot be rewritten exactly fails the load rather than quietly continuing to render live tiles.

    Listener registered on the runtime before the first source-ready / package-loaded emissions so callers can observe the initial lifecycle without race-binding through runtime.on(...). Equivalent to calling runtime.on(listener) immediately after construction. Subsequent events (updatePackage, disposed, …) also flow through this listener.

    popupFactory?: PopupFactory

    Optional popup factory; required only if the caller calls runtime.bindPopup.

    popupRenderer?: PopupRenderer

    Optional popup renderer; defaults to an unstyled <dl> of feature properties.

    requireStyleRefResolution?: boolean
    resolveSource?: SourceResolver

    Resolver passed to createDataset for adapters the built-in set (geoservices-*, ogc-features) does not cover — typically the WFS/WMS/OData/tile-layer adapters contributed by #24–#28.

    resolveStyleRef?: StyleRefResolver

    Out-of-band style-ref body resolver. Only called when the ref has no inline body. When omitted, the runtime defaults to resolving styleRefs.styleId against the server's OGC API – Styles surface (GET /ogc/styles/{styleId}, content-negotiated MapLibre) via createOgcStyleRefResolver, so the JS identifier matches the server's canonical styleId. Pass a callback to override that path (back-compat), or set disableDefaultStyleRefResolver to skip it.

    resolveTheme?: ThemeResolver

    Out-of-band theme resolver. Only called when pkg.theme is absent and pkg.themeId is set.

    signal?: AbortSignal
    skipCompatibilityCheck?: boolean

    Skip client.checkCompatibility() — useful in tests and conformance fixtures.

    sourceErrorPolicy?: SourceErrorPolicy

    Per-source binding error policy. Defaults to "tolerant": a single source failing to bind (resolver throws, toHonuaSourceSpec throws, dataset.source(id) throws) does not abort the whole package load. Failed sources surface via source-error events and the HonuaRuntimeTelemetry.error hook; remaining sources continue to render. Pass "fail-fast" to reject the load on any per-source binding failure (the historical single-source behaviour).

    styleSpecValidationMode?: RuntimeStyleSpecValidationMode

    MapLibre style-spec validation mode used by runtime source/layer mutation helpers. Defaults to "strict"; pass "warning-only" to keep diagnostics non-fatal, or "renderer-deferred" to skip SDK style-spec checks and let the renderer report invalid style values.

    Telemetry collector; wired through the HonuaClient interceptor chain.