Type Alias GeocodingFeature

GeocodingFeature: Feature<Geometry, FeatureProperties> & FeatureBase & {
    address?: string;
    bbox: BBox;
    center: Coordinates;
    context?: FeatureHierarchy[];
    matching_place_name?: string;
    matching_text?: string;
    place_name: string;
    place_type: GeocodingPlaceType[];
    place_type_name: string[];
    relevance: number;
    [key: `place_name_${string}`]: string;
}

Type Declaration

  • [key: `place_name_${string}`]: string

    A string analogous to the place_name field that matches the query in the requested language. This field is only returned when multiple languages are requested using the language parameter, and will be present for each requested language.

  • Optionaladdress?: string

    Address number, if applicable

  • bbox: BBox

    Bounding box of the original feature as [w, s, e, n] array

  • center: Coordinates

    A [lon, lat] array of the original feature centeroid

  • Optionalcontext?: FeatureHierarchy[]

    Feature hierarchy

  • Optionalmatching_place_name?: string

    A string analogous to the place_name field that more closely matches the query than results in the specified language. For example, querying Praha, Czechia with language set to English (en) might return a feature with the place_name Prague, Czechia and a matching_place_name of Praha, Czechia.

  • Optionalmatching_text?: string

    A string analogous to the text field that more closely matches the query than results in the specified language. For example, querying Praha, Czechia with language set to English (en) might return a feature with the text Prague and the matching_text Praha.

  • place_name: string

    Formatted (including the hierarchy) and localized feature full name

  • place_type: GeocodingPlaceType[]

    An array of feature types describing the feature. Currently each feature has only single type but this may change in the future.

  • place_type_name: string[]

    Localized type of the place name, matches place_type property

  • relevance: number

    Indicates how well the returned feature matches the user's query on a scale from 0 to 1. 0 means the result does not match the query text at all, while 1 means the result fully matches the query text. You can use the relevance property to remove results that don't fully match the query.

Was this helpful?

Client JS
Reference
GeocodingFeature