-
new NavBar()
-
Extends
Methods
-
Clear all navbar autocomplete inputs.
-
Returns
cercaliaMap objectReturns:
Cercalia map.
-
Get class name.
Returns:
Class name.
-
Get control HTML Element
Returns:
HTML Element
-
Get control id.
Returns:
Id.
-
Returns
mapboxglMap object -
Get control name. Null if control has not defined name.
Returns:
Class name.
-
getNavBarAutocompleteService(){module:cercaliagl/service/Autocomplete~Autocomplete}
-
Get autocomplete search address service object. More details:
module:cercaliagl/service/Autocomplete~Autocomplete.Returns:
Autocomplete service.
-
getRoutingAutocompleteOptions(){module:cercaliagl/service/Autocomplete~AutocompleteMutableOptions}
-
Returns routing widget autocompletes options
Returns:
Routing autocompletes options
-
Hide control.
-
Show button form UI element. Buttons available to show/hide are for widgets: search address, calculate route, search POIs. You can access this values via constants. Show
buttonNameparameter description.Name Type Description buttonNamestring Button to hide on NavBar control. Possible values:
cercaliagl.control.NavBar.Buttons.ADDRESScercaliagl.control.NavBar.Buttons.POIScercaliagl.control.NavBar.Buttons.ROUTING
-
Reset menu to initial state.
-
Set custom callback function for address search. Set
nullto disable custom function and use default. This is useful if user wants to override default behaviour. Unique parameter received isGeEntity.Example usage:
navBarControl.setAutocompleteAddressCallback(function(data) { const country = data.country.value; const municipality = data.municipality.value; const coordX = parseFloat(data.coord.x); const coordY = parseFloat(data.coord.y); console.log(country, municipality, coordY + ',' + coordX); });Name Type Description fnfunction Callback function.
nullto use default API behaviour. -
Set custom callback function for coordinates search, same behaviour as customAutocompleteAdressCallback. Set
nullto disable custom function and use default.Name Type Description fnfunction Callback function.
nullto use default API behaviour. -
Sets the options for the routing widget autocompletes
Name Type Description optionsRouting autocompletes options
Name Type Description searchInsideCountrystring | Array.<string> | null searchInsideRegionstring | Array.<string> | null searchInsideProvincestring | Array.<string> | null searchInsideMunicipalitystring | Array.<string> | null searchInsideLocalitystring | Array.<string> | null searchFilterEntitystring | Array.<string> | undefined searchPriorityEntitystring | Array.<string> | undefined searchPreferredEntitystring | Array.<string> | null searchCoordinateReferencemodule:cercaliagl/LonLat~LonLat | null searchInsideRadiusnumber | null searchFilterTypestring | Array.<string> | null poiCategoriesstring | Array.<string> | null langstring | Array.<string> | undefined closeSuggestionsIfInputIsEmptyboolean -
Show control.
-
Show button form UI element. Buttons available to show/hide are for widgets: search address, calculate route, search POIs. You can access this values via constants. Show
buttonNameparameter description.Name Type Description buttonNamestring Button to show on NavBar control. Possible values:
cercaliagl.control.NavBar.Buttons.ADDRESScercaliagl.control.NavBar.Buttons.POIScercaliagl.control.NavBar.Buttons.ROUTING