Performs searches and manages search state for a SearchView. More...
Since: | Esri.ArcGISRuntime 100.13 |
Properties
- activeSource : var
- automaticConfigurationEnabled : bool
- currentQuery : string
- defaultPlaceholder : string
- eligableForRequery : bool
- geoView : var
- queryArea : Geometry
- queryCenter : Point
- resultMode : int
- results : ListModel
- selectedResult : var
- sources : ListModel
- suggestions : ListModel
Methods
- void acceptSuggestion(ListElement searchSuggestion)
- void clearSearch()
- void commitSearch(bool restrictToArea)
Detailed Description
Property Documentation
The currently active search source. All sources are used if this property is null.
Flag for whether automatic configuration is enabled or not. Determines whether the view will update its configuration based on the attached geoview's geomodel automatically. This includes such properties as queryCenter, queryArea, and eligableForRequery.
Defaults to true.
The current user-entered query. This property drives both suggestions and searches.
The string shown in the search view when no user query is entered. Default is "Find a place or address".
Flag for whether the user can perform a requery. A requery will perform the search at the same location, but will only look at results that exist within the current extent, ignoring all other results.
The geoView the controller may optionally use for setting results, and for updating the active search area and preferred search location.
The search area to be used for the current query.
Ignored in most queries, unless the restrictToArea
flag is set to true when calling SearchViewController::commitSearch.
This property should be updated as the user navigates the map/scene, or at minimum before calling SearchViewController::commitSearch.
Defaults to null
The center for the search.
This property is used to weigh results in favour of those results closest to the center. This allows results to be local to the active viewpoint.
This should be updated by the view every time the user navigates the map.
Defaults to null.
The mode which dictates how results are displayed.
With Automatic
, if only a single result is found, then this is automatically set as the selected result. Otherwise when there is more than one possible result then the results property is populated with all possible results.
With Multiple
, the results property is always populated with all found results (even if there is only 1 result in the list).
With Single
, even if multiple results are found, the best result is automatically set as the "selected" result and the results property is never populated.
The default value is Automatic
.
The collection of search results from a query.
A result is a ListElement with the following fields.
name | type | description |
---|---|---|
displayTitle | string | The result heading. |
displaySubtitle | string | Optional result subheading. |
markerImageUrl | url | URL of the image to display alongside result. |
owningSource | object | The search-source this result was created from. |
geoElement | GeoElement | The optional map location/graphic of this result. |
selectionViewpoint | Envelope | An area containing the result. |
The collection of search sources to be used.
Each element is a ListElement with a single modelData
field, which contains the search source object.
The collection of suggestion results from a query.
A suggestion is a ListElement with the following fields.
name | type | description |
---|---|---|
displayTitle | string | The suggestion heading. |
displaySubtitle | string | Optional suggestion subheading. |
collection | bool | Flag for if the suggestion is a boolean. |
markerImageUrl | url | URL of the image to display alongside suggestion. |
owningSource | object | The search-source this suggestion was created from. |
suggestion | SuggestionResult | The SuggestionResult that populated this ListElement . |
Method Documentation
Starts a search using the given suggestion result searchSuggestion.
At minimum the searchSuggestion needs two fields. `owningSource`, which points to the search source to perform the search, and `suggestion`, which is a SuggestionResult
.
Clears the search. This will clear results , suggestions, selectedResult and currentQuery.
Starts a search using the current query. When restrictToArea is true
then the query will only look for results within the current queryArea.