Georeferencing API
    Preparing search index...

    Interface ReferenceWatchOptions<P, T>

    Hooks connecting watchReferences to a map binding.

    interface ReferenceWatchOptions<P extends ReferenceBase, T> {
        controller: GeoreferencerController;
        debounceMs?: number;
        definitions?: Definitions;
        apply(provider: P, data: T | null): void;
        followsView?(provider: P): boolean;
        load(
            provider: P,
            query: Query | null,
        ): Promise<{ data: T; message?: string; partial: boolean } | null>;
        onStatus?(id: string, status: ReferenceLoadStatus): void;
        view(): { crs: string; extent: Extent; resolution: number };
    }

    Type Parameters

    Index
    • Display loaded data, or clear the provider's display when data is null.

      Parameters

      • provider: P
      • data: T | null

      Returns void

    • Whether a provider follows viewport navigation. Defaults to WFS/custom sources without fixed loading.

      Parameters

      • provider: P

      Returns boolean

    • Load one provider. query is null for static sources that ignore the viewport. Return null to leave the provider empty without an error.

      Parameters

      • provider: P
      • query: Query | null

      Returns Promise<{ data: T; message?: string; partial: boolean } | null>

    • Current host view: visible extent and resolution in crs. Throw if the view or its projection is unavailable; the provider then reports an error.

      Returns { crs: string; extent: Extent; resolution: number }

      • crs: string

        Map CRS of the extent.

      • extent: Extent

        Visible extent in crs.

      • resolution: number

        Map units per pixel.

    Controller receiving provider statuses for its snapshot.

    debounceMs?: number

    Delay before refreshing after navigation, in milliseconds.

    150

    definitions?: Definitions

    Host projection definitions for query bounds.