Interface FocusOptions

Set of options when you want to prioritize places from particular region.

new JawgPlaces({
focus: {
countries: 'fra',
point: { lat: 0, lon: 0 },
gids: ['whosonfirst:locality:101751119']
}
})
interface FocusOptions {
    countries: string | string[] | (() => string[]) | (() => string);
    gids: string | string[] | (() => string[]) | (() => string);
    point?: LatLon | (() => LatLon);
}

Properties

Properties

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

Add a priorities by alpha-2 or alpha-3 ISO-3166 country code. Countries can be static or dynamic with the function.

Type declaration

    • (): string[]
    • Returns string[]

Type declaration

    • (): string
    • Returns string

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

Add a priorities by Jawg GIDs. GIDs can be static or dynamic with the function.

Type declaration

    • (): string[]
    • Returns string[]

Type declaration

    • (): string
    • Returns string

point?: LatLon | (() => LatLon)

Sort results in part by their proximity to the given coordinate. Coordinates can be static or dynamic with the function.

Type declaration

Generated using TypeDoc