- 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
- void acceptSuggestion(ListElement searchSuggestion)
- void clearSearch()
- void commitSearch(bool restrictToArea)
activeSource : var
The currently active search source. All sources are used if this property is null.
automaticConfigurationEnabled : bool
currentQuery : string
The current user-entered query. This property drives both suggestions and searches.
defaultPlaceholder : string
The string shown in the search view when no user query is entered. Default is "Find a place or address".
eligableForRequery : bool
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.
geoView : var
The geoView the controller may optionally use for setting results, and for updating the active search area and preferred search location.
queryArea : Geometry
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
queryCenter : Point
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.
resultMode : int
The mode which dictates how results are displayed.
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.
Multiple, the results property is always populated with all found results (even if there is only 1 result in the list).
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
[read-only] results : ListModel
The collection of search results from a query.
A result is a ListElement with the following fields.
|The result heading.|
|Optional result subheading.|
|URL of the image to display alongside result.|
|The search-source this result was created from.|
|The optional map location/graphic of this result.|
|An area containing the result.|
selectedResult : var
[read-only] sources : ListModel
The collection of search sources to be used.
Each element is a ListElement with a single
modelData field, which contains the search source object.
[read-only] suggestions : ListModel
The collection of suggestion results from a query.
A suggestion is a ListElement with the following fields.
|The suggestion heading.|
|Optional suggestion subheading.|
|Flag for if the suggestion is a boolean.|
|URL of the image to display alongside suggestion.|
|The search-source this suggestion was created from.|
void acceptSuggestion(ListElement searchSuggestion)
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
void commitSearch(bool restrictToArea)
Starts a search using the current query. When restrictToArea is
true then the query will only look for results within the current queryArea.