Class: DataSearcher

DataSearcher

Searches a {Septima.Search.SearchableData}

new DataSearcher(options)

Parameters:
Name Type Description
options Object DataSearcher expects these properties:
Properties
Name Type Description
searchableData Septima.Search.SearchableData An object of type Septima.Search.SearchableData
Source:
  • searchers/dataSearcher.js, line 9

Extends

Methods

addCustomButtonDef(customButtonDef)

Displays an icon next to each result.
Parameters:
Name Type Description
customButtonDef Septima.Search.Searcher.CustomButtonDef
Inherited From:
Source:
  • searchers/searcher.js, line 362

createQueryResult() → {Septima.Search.QueryResult}

Create a {Septima.Search.QueryResult}.
Inherited From:
Source:
  • searchers/searcher.js, line 180
Returns:
Type
Septima.Search.QueryResult

getCentroid(geoJsonObject) → {GeoJsonObject}

Find the centroid
Parameters:
Name Type Description
geoJsonObject geoJsonObject
Inherited From:
Source:
  • searchers/searcher.js, line 212
Returns:
Type
GeoJsonObject

getPointOnSurface(geoJsonObject) → {GeoJsonObject}

Find a point guaranteed to lie on the surface
Parameters:
Name Type Description
geoJsonObject geoJsonObject
Inherited From:
Source:
  • searchers/searcher.js, line 200
Returns:
Type
GeoJsonObject

onSelect(result)

This method is called by the controller when a result is selected.
This method MAY be implemented by searchers.
Implementations MUST call this._onSelectCallback(result)
Parameters:
Name Type Description
result Septima.Search.Searcher.Result
Inherited From:
Source:
  • searchers/searcher.js, line 155

registerTarget(target)

Register a target.
Parameters:
Name Type Description
target string
Inherited From:
Source:
  • searchers/searcher.js, line 165

translateWktToGeoJsonObject(wkt) → {GeoJsonObject}

Convert a wkt string to a geojson object
Parameters:
Name Type Description
wkt string
Inherited From:
Source:
  • searchers/searcher.js, line 189
Returns:
Type
GeoJsonObject

Type Definitions

selectCallback(result)

This function is called when a result is selected.
Parameters:
Name Type Description
result Object
Properties
Name Type Description
title string
description string
data object The selected object
Source:
  • searchers/dataSearcher.js, line 10