This is the documentation of version 1.0.0-rc.1. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias SearchSuggestionsParams

    SearchSuggestionsParams: CommonServiceParams & {
        filters?: {
            areaTypes?: GeographyType[];
            boundingBox?: HasBBox;
            countries?: string[];
            kinds?: SearchSuggestionKind[];
            poiTypes?: POICategory[];
        };
        geoBias?: Pick<PointGeoBias, "position">;
        limit?: number;
        query: string;
    }

    Parameters for getSearchSuggestions.

    Type Declaration

    • Optionalfilters?: {
          areaTypes?: GeographyType[];
          boundingBox?: HasBBox;
          countries?: string[];
          kinds?: SearchSuggestionKind[];
          poiTypes?: POICategory[];
      }

      What the result set is restricted to.

    • OptionalgeoBias?: Pick<PointGeoBias, "position">

      The point to search around.

      position ranks nearer results higher without excluding anything, and is what distanceInMeters is measured from. It is only a point. filters.boundingBox restricts the results.

    • Optionallimit?: number

      Maximum results in the list.

      5
      

      Capped at 10.

    • query: string

      What the user typed, which can be a partial or a complete query.

    They follow Places Search v3's suggest body, with filters for what narrows the result set and geoBias.position for the point to search around.