SuggestParameters Class

LocatorTask."> SuggestParameters Class | ArcGISQtCpp
  • SuggestParameters
  • class Esri::ArcGISRuntime::SuggestParameters

    Parameters for suggesting potential matches using a LocatorTask. More...

    Header: #include <SuggestParameters.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    SuggestParameters(const Esri::ArcGISRuntime::SuggestParameters &other)
    SuggestParameters(Esri::ArcGISRuntime::SuggestParameters &&other)
    QStringList categories() const
    QString countryCode() const
    int maxResults() const
    Esri::ArcGISRuntime::Point preferredSearchLocation() const
    Esri::ArcGISRuntime::Geometry searchArea() const
    void setCategories(const QStringList &categories)
    void setCountryCode(const QString &countryCode)
    void setMaxResults(int maxResults)
    void setPreferredSearchLocation(const Esri::ArcGISRuntime::Point &preferredSearchLocation)
    void setSearchArea(const Esri::ArcGISRuntime::Geometry &searchArea)
    Esri::ArcGISRuntime::SuggestParameters &operator=(const Esri::ArcGISRuntime::SuggestParameters &other)
    Esri::ArcGISRuntime::SuggestParameters &operator=(Esri::ArcGISRuntime::SuggestParameters &&other)

    Detailed Description

    Geocoding suggestions provide a mechanism for implementing character-by- character auto-complete. Using a text input and optional SuggestParameters, suggested addresses can be quickly found and presented to the user. Suggestions are not limited to addresses, they can also be used for POIs Points of Interest). To return a focused set of suggestions, set the SuggestParameters::preferredSearchLocation or the SuggestParameters::searchArea. Apply the SuggestParameters to your search with SuggestListModel::setSuggestParameters.

    Member Function Documentation


    Default constructor.

    SuggestParameters::SuggestParameters(const Esri::ArcGISRuntime::SuggestParameters &other)

    Copy constructor from other SuggestParameters.

    SuggestParameters::SuggestParameters(Esri::ArcGISRuntime::SuggestParameters &&other)

    Move constructor from other SuggestParameters.



    QStringList SuggestParameters::categories() const

    Returns the list of categories used for suggestions.

    See also setCategories().

    QString SuggestParameters::countryCode() const

    Returns the country code used for suggestions.

    See also setCountryCode().

    int SuggestParameters::maxResults() const

    Returns the maximum results to be returned by a suggestion.

    Determines the maximum number of returned suggestions. Supported value from interval [1..15], 5 by default.

    See also setMaxResults().

    Esri::ArcGISRuntime::Point SuggestParameters::preferredSearchLocation() const

    Returns the preferred search location of a suggestion.

    See also setPreferredSearchLocation().

    Esri::ArcGISRuntime::Geometry SuggestParameters::searchArea() const

    Returns the search area of a suggestion.

    For example, you may want to only search for addresses that are inside of the map view's currently visible extent.

    See also setSearchArea().

    void SuggestParameters::setCategories(const QStringList &categories)

    Sets the list of categories used for suggestions.

    The category parameter limits the types of places for which the service searches, thus eliminating false positive matches and potentially speeding up the search process. You can specify categories by different levels of detail. For example, if you were searching for somewhere to eat, you could specify the category as "Korean Food" for something specific, "Food" for something more generic, or even "POI" for something very generic.

    Note: Categories are currently not supported with local locators. However, a gazateer-style locator could be used instead to get a similar output.

    See also categories() and Category filtering.

    void SuggestParameters::setCountryCode(const QString &countryCode)

    Sets the country code used for suggestions to countryCode.

    Examples of country codes include CN for China, IS for Iceland, and US for The United States.

    See also countryCode() and Geocoding Country Codes.

    void SuggestParameters::setMaxResults(int maxResults)

    Sets the maxResults to be returned by a suggestion.

    See also maxResults().

    void SuggestParameters::setPreferredSearchLocation(const Esri::ArcGISRuntime::Point &preferredSearchLocation)

    Sets the preferred search location of a suggestion to preferredSearchLocation.

    The search operation can sort result items by their proximity to a preferred search location, such as the user's current location. The priority of the items within 50,000 meters of this location are boosted relative to items that are farther away.

    For example, when searching by name for a business with many locations in the area, there will be many matched items even when a search area is specified. The user would have to look through the items to find the closest store. When the preferred search location is set to the user's current location, the locator can prioritize the items based on proximity to the user.

    By default, no preferred search location is set.

    See also preferredSearchLocation().

    void SuggestParameters::setSearchArea(const Esri::ArcGISRuntime::Geometry &searchArea)

    Sets the searchArea of a suggestion.

    See also searchArea().

    Esri::ArcGISRuntime::SuggestParameters &SuggestParameters::operator=(const Esri::ArcGISRuntime::SuggestParameters &other)

    Assignment operator from other SuggestParameters.

    Esri::ArcGISRuntime::SuggestParameters &SuggestParameters::operator=(Esri::ArcGISRuntime::SuggestParameters &&other)

    Move operator from other SuggestParameters.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.