Module: cercaliagl/service/Autocomplete


Classes

Autocomplete

Members

module:cercaliagl/service/Autocomplete.FilterTypes{string}

Type Definitions

AutocompleteOptions{Object}

Properties:
Name Type Argument Description
callbackSuggestionsFunction function <optional>

Callback function when suggestions changed.

callbackFunction function <optional>

Callback function when selecting autocomplete element.

onInputFunction function | undefined <optional>

Callback function when on input event.

autocompleteId string

<div id="xxxx"> element ID where create add autocomplete functionality.

element Element <optional>

Element

placeholder string <optional>

Input placeholder. If not specified default is Address.

hnrt boolean <optional>

Apply a tolerance in house number ranges. Cercalia suggest search prioritize address that contains the house numbers searched. This parameters lets you apply a tolerance in the house numbers ranges available in the database (+/-50 numbers in general, and +/- 500 in USA), in order to avoid some gaps in this database. Values:
false: don’t apply. Default value
true: apply

label string <optional>

Label text for placeholder

maxCandidates number <optional>

Max candidates to show. Default 5.

searchInsideCountry string | null <optional>

Autocomplete search inside a country (3 characters ISO code), for exemple: ESP. Default value null (all countries).

searchInsideRegion string | null <optional>

Autocomplete search inside a region (Country ISO code + Region code), for exemple: ESPMAD or several regions, for example: ESPCAT,ESPMAD,ESPVAL. Please, contact with Nexus if you need to know region codes.

searchInsideProvince string | null <optional>

Autocomplete search inside a province (Country ISO code + Province code), for exemple: ESP08 (Barcelona), ESP17 (Girona) or several provinces, for example: ESP08,ESP17. Please, contact with Nexus if you need to know province codes.

searchInsideMunicipality string | null <optional>

Autocomplete search inside a municipality (Country ISO code + Province code), for exemple: ESP410917 (Sevilla), ESP502973 (Zaragoza) or several municipality, for example: ESP08,ESP17. Please, contact with Nexus if you need to know municipality codes.

searchInsideLocality string | null <optional>

Autocomplete search inside a locality for exemple: ESP17240205565747 (Barcelona), ESP17240205565484 (Badalona) or several localities, for example: ESP17240205565747,ESP17240205565484. Please, contact with Nexus if you need to know locality codes.

searchClosestHouseNumber boolean <optional>

Search closest real house number in suggest. Default: false.

searchFilterEntity string <optional>

Set filter by municipality / region / subregion / country (by entity code). You can mix that entities. Examples:
ESP170792,ESPCAT,ES08
SolrItem ESP,ESP08,ESP17,PRT,AND.

searchPriorityEntity string | Array.<string> <optional>

Set priority municipality / region / subregion / country (by entity code). This filter, prioritizes the results that are in the specified regions above the other candidates, but does not eliminate the results from other regions or countries. This filter can be combined with the "csr" filter for maximum results filter beyond the priority. Example: ESPVAL. In case you need to prioritize candidates in the list of preferred regions, the regions may be separated by parameters according to priority level: first element: maximum priority, second element: second level priority, etc
Examples:
['ESP170792', 'AND', 'ESP,FRA'].
['ESPCAT', 'ESPMAD', 'PRT,AND,FRA'].

searchPreferredEntity string | Array.<string> <optional>

Set preferred municipality / region / subregion / country (by entity code). This filter, prioritizes the results that are in the specified regions above the other candidates, but does not eliminate the results from other regions or countries. This filter can be combined with the "csr" filter for maximum results filter beyond the preferred. Example: ESPVAL. In case you need to prioritize candidates in the list of preferred regions, the regions may be separated by parameters according to priority level: first element: maximum priority, second element: second level priority, etc
Examples:

poiCategories string <optional>

Set POI categories. If not specified Cercalia will return default POI categories. Categories. For example: ['C012', 'D00CAM', 'C027', 'C016'] ['ESP170792', 'AND', 'ESP,FRA'].
['ESPCAT', 'ESPMAD', 'PRT,AND,FRA'].

floatingLabel boolean <optional>

Floating label for input UI element. Default false.

lang string | Array.<string> <optional>

Set preferred lang to return suggestions. Default null.

GeEntitySuggest{Object}

Properties:
Name Type Argument Description
article string | null <optional>
city module:cercaliagl/servers~ObjectJSON | null <optional>
coord module:cercaliagl/servers~Coord | null <optional>
country module:cercaliagl/servers~ObjectJSON | null <optional>
dist string | null <optional>
frc string | null <optional>
housenumber module:cercaliagl/servers~ObjectJSON | null <optional>
id string | null <optional>
intersection module:cercaliagl/servers~ObjectJSON | null <optional>
km module:cercaliagl/servers~ObjectJSON | null <optional>
kmh string | null <optional>
label string | null <optional>
geometry module:cercaliagl/servers~GeEntityGeometry | null <optional>
municipality module:cercaliagl/servers~ObjectJSON | null <optional>
name module:cercaliagl/servers~ObjectJSON <optional>
pos string | null <optional>
postalcode module:cercaliagl/servers~ObjectJSON | module:cercaliagl/servers~PostalCode | null <optional>
prefix string | null <optional>
region ObjectJSON | null <optional>
sname string | null <optional>
subcategory_id ObjectJSON | string | null <optional>
subregion ObjectJSON | null <optional>
type string | null <optional>
zonename string | null <optional>
param Array.<module:cercaliagl/servers~ParamEntity> <optional>
id string <optional>
category_id string <optional>
formatted_address string <optional>
poi_data Object <optional>