TomTom Maps for JavaScript
    Preparing search index...

    Type Alias SearchSuggestionsParams

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

    Parameters for getSearchSuggestions.

    Type Declaration

    • Optionalfilters?: {
          areaTypes?: NonNullable<PlaceFilters["geographyTypes"]>;
          boundingBox?: HasBBox;
          countries?: NonNullable<GeographicFilters["countries"]>;
          kinds?: SearchSuggestionKind[];
          poiTypes?: NonNullable<PlaceFilters["poiCategories"]>;
      }

      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.