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 term
string The search term.
confirmed
boolean 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 term
string The term for which the user has searched.
confirmed
boolean 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.
addResult
IITC.search.Query.addResult Method to add a result to the query.
addPortalResult
IITC.search.Query.addPortalResult Method to add a portal to the query.