Class: NominatimSearch

NominatimSearch()

new NominatimSearch()

The NominatimSearch.

Source:

Extends

  • React.Component

Methods

doSearch()

Perform the search.

Source:

onFetchError(error)

This function gets called when the nomintim fetch returns an error. It logs the error to the console.

Parameters:
Name Type Description
error String

The errorstring.

Source:

onFetchSuccess(response)

This function gets called on success of the nominatim fetch. It sets the response as dataSource.

Parameters:
Name Type Description
response Array.<object>

The found features.

Source:

onMenuItemSelected(key)

The function describes what to do when an item is selected.

Parameters:
Name Type Description
key value

The key of the selected option.

Source:

onUpdateInput(inputValue)

Called if the input of the AutoComplete is being updated. It sets the current inputValue as searchTerm and starts a search if the inputValue has a length of at least this.props.minChars (default 3).

Parameters:
Name Type Description
inputValue String | undefined

The inputValue. Undefined if clear btn is pressed.

Source:

render()

The render function.

Source:

NominatimSearch(props)

new NominatimSearch(props)

Create the NominatimSearch.

Parameters:
Name Type Description
props Object

The initial props.

Source:

Methods

doSearch()

Perform the search.

Source:

onFetchError(error)

This function gets called when the nomintim fetch returns an error. It logs the error to the console.

Parameters:
Name Type Description
error String

The errorstring.

Source:

onFetchSuccess(response)

This function gets called on success of the nominatim fetch. It sets the response as dataSource.

Parameters:
Name Type Description
response Array.<object>

The found features.

Source:

onMenuItemSelected(key)

The function describes what to do when an item is selected.

Parameters:
Name Type Description
key value

The key of the selected option.

Source:

onUpdateInput(inputValue)

Called if the input of the AutoComplete is being updated. It sets the current inputValue as searchTerm and starts a search if the inputValue has a length of at least this.props.minChars (default 3).

Parameters:
Name Type Description
inputValue String | undefined

The inputValue. Undefined if clear btn is pressed.

Source:

render()

The render function.

Source: