TomTom Maps for JavaScript
    Preparing search index...

    Type Alias PlaceSuggestion

    PlaceSuggestion: SuggestionBase & {
        distanceInMeters?: number;
        id: string;
        kind: "place" | "address" | "street" | "area";
        resolve: (signal?: AbortSignal) => Promise<Place<SearchPlaceProps>>;
        subtitles: string[];
    }

    A location suggestion, with enough to list it and the means to fetch the full place when picked.

    Type Declaration

    • OptionaldistanceInMeters?: number

      Distance from geoBias.position, when one was given.

    • id: string

      The place id, as getPlaceDetails takes it.

    • kind: "place" | "address" | "street" | "area"
    • resolve: (signal?: AbortSignal) => Promise<Place<SearchPlaceProps>>

      The full place behind this suggestion.

    • subtitles: string[]

      Lines under the title that tell similar results apart, such as the address.

      The last one is the country, unless it's the home country: that of the place nearest geoBias.position, or, without geoBias, the country most places are in. Both are judged over the up to 10 places the search fetches, not only the suggestions returned.

    A suggestion list is for choosing, so it carries display fields only. The place itself (geometry, address, POI details) comes from PlaceSuggestion.resolve once the user picks one.