Extends LocatorSearchSource with intelligent search behaviors; adds support for repeated search. More...
Header: | #include <SmartLocatorSearchSource> |
Inherits: | Esri::ArcGISRuntime::Toolkit::LocatorSearchSource |
Public Functions
SmartLocatorSearchSource(Esri::ArcGISRuntime::LocatorTask *locatorTask, QObject *parent = nullptr) | |
virtual | ~SmartLocatorSearchSource() override |
int | repeatSearchResultThreshold() const |
int | repeatSuggestResultThreshold() const |
void | setRepeatSearchResultThreshold(int repeatSearchResultThreshold) |
void | setRepeatSuggestResultThreshold(int repeatSearchSuggestThreshold) |
Reimplemented Public Functions
virtual void | search(const Esri::ArcGISRuntime::SuggestResult &suggestion, const Esri::ArcGISRuntime::Geometry area = Geometry{}) override |
virtual void | search(const QString &searchString, const Esri::ArcGISRuntime::Geometry area = Geometry{}) override |
Detailed Description
Note: Advanced functionality requires knowledge of the underlying locator to be used well; this class implements behaviors that make assumptions about the locator being the world geocode service.
Member Function Documentation
[invokable]
SmartLocatorSearchSource::SmartLocatorSearchSource (Esri::ArcGISRuntime::LocatorTask *locatorTask , QObject *parent = nullptr)
Constructs a new SmartLocatorSearchSource object with a locatorTask and a given parent.
- locatorTask Task to use for performing searches. This should be the world geocode service, or a similarly-configured service.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[override virtual]
SmartLocatorSearchSource::~SmartLocatorSearchSource ()
Destructor.
int SmartLocatorSearchSource::repeatSearchResultThreshold () const
Returns the minimum number of results to attempt to retrieve. If there are too few results, the search is repeated with loosened parameters until enough results are accumulated.
Note: If no search is successful, it is still possible to have a total number of results less than this threshold. Set to zero to disable search repeat behavior. Defaults to 1.
See also setRepeatSearchResultThreshold().
int SmartLocatorSearchSource::repeatSuggestResultThreshold () const
Returns the minimum number of suggestions to attempt to retrieve. If there are too few results, the search is repeated with loosened parameters until enough suggestions are accumulated.
Note: If no search is successful, it is still possible to have a total number of suggestions less than this threshold. Set to zero to disable search repeat behavior. Defaults to 6.
See also setRepeatSuggestResultThreshold().
[override virtual]
void SmartLocatorSearchSource::search(const Esri::ArcGISRuntime::SuggestResult &suggestion, const Esri::ArcGISRuntime::Geometry area = Geometry{})
[override virtual]
void SmartLocatorSearchSource::search(const QString &searchString , const Esri::ArcGISRuntime::Geometry area = Geometry{})
void SmartLocatorSearchSource::setRepeatSearchResultThreshold (int repeatSearchResultThreshold )
Sets the minimum number of results to attempt to retrieve to repeatSearchResultThreshold.
See also repeatSearchResultThreshold().
void SmartLocatorSearchSource::setRepeatSuggestResultThreshold (int repeatSearchSuggestThreshold )
Sets the minimum number of suggestions to attempt to retrieve to repeatSearchSuggestThreshold.
See also repeatSuggestResultThreshold().