Constructor
new LayerSearch(options)
- Implements:
Layer search instance compatible with module:ol-ishare/control/gazetteer~Gazetteer control
To use with module:ol-ishare/control/gazetteer~Gazetteer pass an instance of LayerSearch as a member of module:ol-ishare/control/gazetteer~Gazetteer options.sources Array.
import { LayerSearch } from 'ol-ishare/search';
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options Properties
|
Methods
search(query) → {Promise.<Array.<module:ol-ishare/ui/gazetteer~GazetteerResult>>}
Fetches feature search results, returns a Promise which will resolve to
an Array of module:ol-ishare/ui/gazetteer~GazetteerResult objects or an error
Parameters:
| Name | Type | Description |
|---|---|---|
query |
string | String to search for |
Returns:
Promise that resolves to an Array of GazetteerResult objects or an Error