Library API
    Preparing search index...

    Interface GeoProvider

    Standard interface for pluggable geocoding and geolocation providers.

    interface GeoProvider {
        name: string;
        forwardGeocode?(
            query: string,
            opts?: Record<string, any>,
        ): Promise<ResolvedCoordinates | null>;
        lookup(opts?: Record<string, any>): Promise<GeoLookupResult | null>;
        reverseGeocode?(
            coords: CoordinateInput,
            opts?: Record<string, any>,
        ): Promise<GeoConfig | null>;
    }
    Index
    name: string

    Unique identifier or provider name

    • Optional forward geocoding from place/address query to coordinates

      Parameters

      • query: string
      • Optionalopts: Record<string, any>

      Returns Promise<ResolvedCoordinates | null>

    • Resolves geographic coordinates and location metadata

      Parameters

      • Optionalopts: Record<string, any>

      Returns Promise<GeoLookupResult | null>

    • Optional reverse geocoding from coordinates to location details

      Parameters

      Returns Promise<GeoConfig | null>