Interface FocusOptions

Set of options to prioritize your forward geocoding to specific regions. All locations in these regions will have a better ranking.

const focus = {
countries: 'fra',
point: { lat: 46.842269, lon: 2.39985 },
gids: ['openstreetmap:island:relation/966358']
}
interface FocusOptions {
    countries?: string | string[] | () => string[] | () => string;
    gids?: string | string[] | () => string[] | () => string;
    point?: LatLon | () => LatLon;
}

Properties

countries?: string | string[] | () => string[] | () => string

Option to set alpha-2 or alpha-3 ISO-3166 country codes to prioritize forward geocoding results to specific countries. All locations in these countries will have a better ranking.

Countries can be static or dynamic through a function.

gids?: string | string[] | () => string[] | () => string

Option to set GIDs to prioritize forward geocoding results to specific regions (States, Cities...) using our identifiers. All locations connected to these GIDs will have a better ranking.

GIDs can be static or dynamic through a function.

point?: LatLon | () => LatLon

Sort results in part by their proximity to the given coordinate.

Coordinates can be static or dynamic through a function. The radius is 50km and cannot be changed.