new module:Search(map, lizmap3)
Create a search instance
Parameters:
| Name | Type | Description |
|---|---|---|
map |
Map | OpenLayers map |
lizmap3 |
object | The old lizmap object |
- Source:
Classes
Methods
_addClearHandler()
PRIVATE method: bind the header clear button to reset search state
- Source:
_addExternalSearch(searchConfig) → {boolean}
PRIVATE method: add external geocoder search capability with autocomplete
Parameters:
| Name | Type | Description |
|---|---|---|
searchConfig |
object | search configuration |
- Source:
Returns:
external search is in the user interface
- Type
- boolean
_addSearch(searchConfig) → {boolean}
PRIVATE method: add lizmapFts search capability with autocomplete
Parameters:
| Name | Type | Description |
|---|---|---|
searchConfig |
object | search configuration |
- Source:
Returns:
search is in the user interface
- Type
- boolean
_addSearches() → {boolean|void}
PRIVATE method: _addSearches add searches capability
- Source:
Returns:
searches added to the user interface
- Type
- boolean | void
_buildAutoSearch(performFn) → {function}
Returns an auto-search handler that clears results below min length, otherwise delegates to performFn
Parameters:
| Name | Type | Description |
|---|---|---|
performFn |
function | search function to call when input is long enough |
- Source:
Returns:
- Type
- function
_clearSearch()
Clear search input, results, and map highlight
- Source:
_debounce(fn, delay) → {function}
Returns a debounced version of fn that fires after delay ms of inactivity
Parameters:
| Name | Type | Description |
|---|---|---|
fn |
function | |
delay |
number | milliseconds |
- Source:
Returns:
- Type
- function
_getHighlightRegEx() → {RegExp}
Get the highlight regular expression
- Source:
Returns:
The regular expression
- Type
- RegExp
_performExternalSearch(searchConfig, service, extent)
PRIVATE method: fire an external geocoder search request and display results
Parameters:
| Name | Type | Description |
|---|---|---|
searchConfig |
object | search configuration |
service |
string | object | resolved service URL or Google Geocoder instance |
extent |
OpenLayers.Bounds | WGS84 map extent for filtering |
- Source:
_performFtsSearch(searchConfig, extent)
PRIVATE method: fire a lizmapFts search request and display results
Parameters:
| Name | Type | Description |
|---|---|---|
searchConfig |
object | search configuration |
extent |
OpenLayers.Bounds | WGS84 map extent for filtering |
- Source:
_startExternalSearch()
Start the external search
- Source:
_updateExternalSearch(aHTML)
Update external search
Parameters:
| Name | Type | Description |
|---|---|---|
aHTML |
string | HTML to update |
- Source: