Constructor
new AddressSearch(options)
- Implements:
Address search instance compatible with Gazetteer control, uses iShare LocationSearch web service.
To use with module:ol-ishare/control/gazetteer~Gazetteer pass an instance of AddressSearch as a member of module:ol-ishare/control/gazetteer~Gazetteer options.sources Array.
import { AddressSearch } from 'ol-ishare/search';
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options Properties
|
Methods
search(query) → {Promise.<Array.<module:ol-ishare/ui/gazetteer~GazetteerResult>>}
Fetches address 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