Class: Autocomplete

(abstract) bemap.Autocomplete(context, options)

Base class for Autocomplete.

Constructor

(abstract) new Autocomplete(context, options)

Parameters:
Name Type Description
context bemap.Context BeMap-JS-API Context. Mandatory.
options object see below the available values.
Source:

Methods

attachToInput(inputEl, options) → {Object}

Thin delegate to `bemap.helpers.attachAutocompleteToInput`. Kept on the prototype for ergonomics. The full implementation (and full JSDoc parameter list) lives in `bemap-autocomplete-attach.js`.
Parameters:
Name Type Description
inputEl HTMLInputElement
options Object See `bemap.helpers.attachAutocompleteToInput`.
Since:
  • 1.5.0
Source:
Returns:
Type
Object

autocomplete(request, optionsopt) → {Promise.<bemap.AutocompleteGeocodingResponse>}

Send a typed autocomplete request. Pure HTTP mapper — no DOM, no map.
Parameters:
Name Type Attributes Description
request bemap.AutocompleteGeocodingRequest
options Object <optional>
Properties
Name Type Attributes Description
geoserver String <optional>
signal AbortSignal <optional>
Since:
  • 1.5.0
Source:
Returns:
Type
Promise.<bemap.AutocompleteGeocodingResponse>

query(map, query, listener)

Generate the BeMap request in URL encoded format. Excute the request by calling the BeMap server and wait the answer.
Parameters:
Name Type Description
map bemap.map To get coords needed in autocomplete propositions.
query string String to search.
listener function The function to call to get click data.
Source:

showOnMap(map, coordinates, options)

Parse data to create marker on map
Parameters:
Name Type Description
map bemap.Map for creating new marker.
coordinates bemap.Coordinate Array of bemap.Coordinate.
options object see below the available values.
Source: