Function loadMapPackage

  • Load a MapPackage onto a caller-provided MaplibreMap. Returns a runtime handle that exposes the operational API. Throws HonuaMapPackageError on binding failure. Query-time adapter errors (HonuaHttpError, HonuaCapabilityNotSupportedError, ...) continue to flow through the returned Source promises on runtime.dataset and through the shared HonuaClient interceptor chain.

    Per-source binding tolerance is governed by LoadMapPackageOptions.sourceErrorPolicy — the default "tolerant" policy lets a heterogeneous (mixed-protocol) composition keep rendering when one source fails by skipping the failing source (and any layers that reference it) and emitting a source-error runtime event plus a source-bind telemetry error span. Pass "fail-fast" to restore the historical reject-on-any-binding-failure behaviour.

    Returns Promise<HonuaMapRuntime>