AddressSearch

ol-ishare/search~ AddressSearch

Address search instance compatible with Gazetteer control

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
Name Type Attributes Default Description
iShareUrl String

Base URL for iShare Web app

profile String

Name of profile that the search is associated with

srs String <optional>
'EPSG:27700'

EPSG code of the profile defaults to EPSG:27700 (British National Grid)

pageSize Number <optional>
10

Number of results to fetch per request, maximum of 100

Methods

Implements:

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

Type
Promise.<Array.<module:ol-ishare/ui/gazetteer~GazetteerResult>>