ol-ishare/ui/gazetteer

Classes

Gazetteer

Interfaces

GazetteerSource

Methods

(inner) createGazetteer(iShareUrl, options) → {Promise.<module:ol-ishare/ui/gazetteer~Gazetteer>}

Factory function to create a UI Gazetteer instance pre-configured with UI text loaded from iShare Language Editor

Parameters:
Name Type Description
iShareUrl String

Base URL for iShare Web app

options module:ol-ishare/ui/gazetteer~GazetteerOptions

Gazetteer options

Returns:

Promise which resolves to a UI Gazetteer instance

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

Type Definitions

GazetteerOptions

Properties:
Name Type Description
target String

DOM element that the control will be created within

iShareUrl String

Base URL for iShare Web app. If iShareUrl and profile options are not supplied then one or more module:ol-ishare/ui/gazetteer~GazetteerSource instances must be specified via the sources option.

profile String

Name of profile that the search is associated with. If iShareUrl and profile options are not supplied then one or more module:ol-ishare/ui/gazetteer~GazetteerSource instances must be specified via the sources option.

sources Array.<module:ol-ishare/ui/gazetteer~GazetteerSource>

List of GazetteerSource instances that will be queried for results. See module:ol-ishare/search~AddressSearch and module:ol-ishare/search~LayerSearch for examples of classes that implement GazetteerSource

placeholder String

Placeholder text displayed by the input

noResults String

Message to display when no results are found

queryTooShort String

Accessibility hint to indicate that the query is too short. The string can contain an optional placeholder for minQueryLength, for example: Input ${minQueryLength} or more characters for results

selectedOption String

Accessibility hint to indicate the selected option. The string can contain optional placeholders for selectedOption, length and index, for example: ${selectedOption} ${index} of ${length} is highlighted

resultsDescription String

Accessibility hint to indicate which options are available and which is selected. The string can contain optional placeholders for length and selectedOption, for example: Result count: ${length}. ${selectedOption}

assistiveHint String

Accessibility hint to provide an initial instruction to the assistive tech user.

Type:

GazetteerResult

Properties:
Name Type Description
id string

Unique ID of the result (UPRN, planning application reference etc.)

coord Array.<number>

Coordinate of result e.g. [x: number, y: number]

bbox Array.<number>

Bounding box coordinates of the result e.g. [x_min: number, y_min: number, x_max: number, y_max: number]

srs string

Spatial reference system code of coord or bbox

text string

Result text

formatted string

Result text with matching part of text highlighted via html