Interface BoudaryOptions

Set of options to restrict your forward geocoding to specific regions. It will filter out all locations outside the configured boundaries.

const boundary = {
countries: 'fra',
circle: { lat: 46.842269, lon: 2.39985, radius: 500 },
rectangle: {
min: { lat: 43.032582, lon: 5.097656 },
max: { lat: 49.006466, lon: 26.762695 },
},
gids: ['openstreetmap:island:relation/966358']
}
interface BoudaryOptions {
    circle?: CircleOptions | () => CircleOptions;
    countries?: string | string[] | () => string[] | () => string;
    gids?: string | string[] | () => string[] | () => string;
    rectangle?: RectangleOptions | () => RectangleOptions;
}

Properties

circle?: CircleOptions | () => CircleOptions

Option to set a circle to constrain forward geocoding results to a specific circular geographic area.

const circle = { lat: 46.842269, lon: 2.39985, radius: 500 }

The circle can be static or dynamic through a function.

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

Option to set alpha-2 or alpha-3 ISO-3166 country codes to constrain forward geocoding results to specific countries.

Countries can be static or dynamic through a function.

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

Option to set GIDs to constrain forward geocoding results to specific regions (States, Cities...) using our identifiers.

GIDs can be static or dynamic with the function.

Option to set a rectangle to constrain forward geocoding results to a specific rectangular geographic area.

const rectangle = {
min: { lat: 43.032582, lon: 5.097656 },
max: { lat: 49.006466, lon: 26.762695 },
}

The rectangle can be static or dynamic through a function.