new NominatimSearch()
The NominatimSearch.
Extends
- React.Component
Methods
doSearch()
Perform the search.
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. |
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. |
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. |
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. |
render()
The render function.