photon API
Everything the package exports, by the path you import it from. Open an export for its signature and options.
@evolve-framework/photon
PhotonAddressSuggestModule and its options
Classes
PhotonAddressSuggestModuleQuery.addressSuggest and addressResolve from a Photon geocoder over OpenStreetMap, for type-ahead address entry in the configured countries.
import { PhotonAddressSuggestModule } from "@evolve-framework/photon";Every query answers null for a country it is not configured for, or when Photon is unavailable, so a form falls back to another way of entering the address.
Extends AbstractModule<unknown>
new PhotonAddressSuggestModule(options: PhotonAddressSuggestOptions)| Option | Type | Description |
|---|---|---|
countries | readonly string[] | The countries to answer for, as ISO 3166-1 alpha-2 codes; any other country answers null without a request. |
baseUrl? | string | Defaults to the public instance; point it at a self-hosted Photon. |
timeoutMs? | number | How long a request may take before it counts as unavailable. Defaults to 3 seconds. |
minQueryLength? | number | The fewest characters a search needs before Photon is asked. Defaults to 3. |
fetch? | ((url: string | URL | Request, options?: RequestInit | undefined, spanName?: string | undefined) => Promise<Response>) | Defaults to the framework's traced fetch. |
Not listed: 1 options types. They appear as the tables under the constructors and functions they type.

