new AutocompleteElement(optionsopt)
BeNomad BeMap JavaScript API - AutocompleteElement
One entry in the autocomplete result list. The Worker returns the matched
place string plus a `reference` token that can be fed back into a full
geocoding call to obtain the structured coordinate / postal address.
Parameters:
| Name |
Type |
Attributes |
Description |
options |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Description |
place |
String
|
<optional>
|
The display string with `|` separators stripped. |
rawPlace |
String
|
<optional>
|
The original server string (unmodified). |
reference |
String
|
<optional>
|
Opaque reference for follow-up geocoding. |
highlight |
String
|
<optional>
|
Server-rendered highlight string (HTML-style). |
positions |
Array.<Array.<Number>>
|
<optional>
|
Match positions as `[[start, end], ...]`. |
postalAddress |
bemap.PostalAddress
|
<optional>
|
Only populated when `addressDetails: true`. |
coordinate |
bemap.Coordinate
|
<optional>
|
Only populated when the Worker resolved it. |
|
- Since:
- Source:
Methods
Factory that builds an `AutocompleteElement` from the raw JSON returned by
the BeMap autocomplete endpoint. Tolerates missing fields.
Parameters:
| Name |
Type |
Description |
item |
Object
|
|
- Source:
Returns:
-
Type
-
bemap.AutocompleteElement