Provides functionality for the search system within the application.
You can implement your own result provider by listening to the search hook:
window.addHook('search', function(query) {});.
Example
// Adding a search result
window.addHook('search', function(query) {
query.addResult({
title: 'My Result',
position: L.latLng(0, 0)
});
});
Classes
Namespaces
Methods
-
static doSearch(term, confirmed)
-
Initiates a search with the specified term and confirmation status.
Parameters:
Name Type Description termstring The search term.
confirmedboolean Indicates if the search term is confirmed.
-
static setup()
-
Sets up the search input field and button functionality.
Type Definitions
-
SearchQuery
-
Properties:
Name Type Description termstring The term for which the user has searched.
confirmedboolean Indicates if the user has pressed enter after searching. You should not search online or do heavy processing unless the user has confirmed the search term.
addResultIITC.search.Query.addResult Method to add a result to the query.
addPortalResultIITC.search.Query.addPortalResult Method to add a portal to the query.