This namespace contains definitions for controls. A control is just a user
interface object that is added to the DOM and triggers events, but has no code
in response to that events. As in popular development frameworks as JDK or
.NET, controls here are just visual elements that produce events. The code
needed to respond to that events should be outside the controls, in
actions or in external handlers to the given events.
- Source:
- bu/controls/control.jsdoc
Classes
- Attribution
- BaselayerTypeSwitcher
- BaselayerTypeSwitcherEvent
- Brightness
- CheckBox
- Contrast
- Control
- DataSources
- DoubleButton
- Dropdown
- DropdownEvent
- FileSelect
- FileSelectEvent
- Goto
- Label
- LayerSwitcher
- LayerSwitcherAddEvent
- LayerSwitcherEvent
- Login
- LoginEvent
- Logout
- MainMenu
- MainMenuEvent
- MeasurementSwitcherEvent
- ObliqueLabel
- OrientationEvent
- ProgressLabel
- ScaleLine
- Search
- SearchEvent
- Select
- SelectEvent
- SideBar
- SideBarButton
- SingleButton
- Slider
- SliderEvent
- Spinner
- SpinnerEvent
- StatusBar
- Switcher
- SwitcherEvent
- TextBox
- Toggle
- ToolsMenu
- Zoom
- ZoomEvent
- ZoomSlider
Type Definitions
-
AttributionOptions
-
Options for
bu.control.AttributionType:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
collapsibleboolean | undefined If the control can collapse when not enough space.
collapsedboolean | undefined initial state.
tipLabelstring | undefined tooltip for the button.
labelstring | Node | undefined label for the button. Empty for icon.
collapseLabelstring | Node | undefined label for collapsed button.
handlerfunction | undefined function called in click.
-
CheckBoxOptions
-
Options for
bu.control.CheckBox.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
tipLabelstring | undefined Tooltip.
labelstring | Node | undefined Label.
checkedboolean | undefined Initial value. False by default.
handlerfunction | undefined Function called in click.
-
ControlOptions
-
Options for
bu.control.Control.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined The HTML element where the control is drawn.
targetElement | string | bu.Viewer | undefined The HTML element where the control is appended. If a
bu.Vieweris provided then it will be an HTML element inside the viewer viewport.controlsArray.<bu.ControlDefinition> | undefined The control definitions to add to this control.
-
DataSourcesOptions
-
Options for
bu.control.DataSources.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
filesFilterstring | undefined The files filter to show in the 'Open files' dialog, as for example '.geojson, .kml'.
-
DoubleButtonEventType
-
Types of events for a
bu.control.DoubleButton.BUTTON1CLICK: 'button1click' // Triggered when a button 1 in double button control is clicked. BUTTON2CLICK: 'button2click' // Triggered when a button 2 in double button control is clicked.Type:
- string
- Source:
- bu/enums.js
-
DoubleButtonOptions
-
Options for
bu.control.DoubleButton.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
className1string | undefined The class name for the HTML button 1 element.
className2string | undefined The class name for the HTML button 2 element.
deltanumber | undefined The number for value that increases or decreases using the buttons.
button1Labelstring | undefined The label or the icon for the button 1 element.
button2Labelstring | undefined The label or the icon for the button 2 element.
button1TipLabelstring | undefined The tool tip text for the button 1 element.
button2TipLabelstring | undefined The tool tip text for the button 2 element.
button1Handlerfunction | undefined The Function called in the click of the button 1 with a param delta.
button2Handlerfunction | undefined The Function called in the click of the button 2 with a param delta.
-
DropdownOptions
-
Options for
bu.control.Dropdown.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
buttonTipLabelstring | undefined Tooltip.
buttonLabelClassstring | undefined This the class name for the label HTML element.
listArray.<string> | undefined List of strings to be shown as content of items.
listValuesArray.<string> | undefined List of strings to be shown as values of items.
selectedItemnumber | undefined Index of the initial selected item. Items starts in zero.
stylebu.control.DropdownStyle | undefined The type of dropdown, if it is a list of buttons or a listbox.
-
DropdownStyle
-
Styles for a
bu.control.Dropdown.BUTTONS: 'button' // The Dropdown is shown as a collection of buttons with no scrolling. LISTBOX: 'listbox' // The Dropdown is shown as a listbox with scrollingType:
- string
- Source:
- bu/enums.js
-
EventType
-
Types of events for a
bu.control.Control.CHANGE: 'change' // Triggered when the value that contains a control is changed. CLICK: 'click' // Triggered when an control is clicked. DBLCLICK: 'dblclick' DRAGENTER: 'dragenter' DRAGOVER: 'dragover' DROP: 'drop' ENDCHANGE: 'endchange' // Triggered when a change is ended. ERROR: 'error' FILESELECTED: 'fileselected' // Triggered when a file is selected. INPUT: 'input' // Triggered when a input, select or textarea control changes. KEYUP: 'keyup' KEYDOWN: 'keydown' KEYPRESS: 'keypress' LOAD: 'load' // Triggered when a document is loaded. MOUSEDOWN: 'mousedown' MOUSEENTER: 'mouseenter' MOUSELEAVE: 'mouseleave' MOUSEMOVE: 'mousemove' MOUSEOUT: 'mouseout' MOUSEUP: 'mouseup' MOUSEWHEEL: 'mousewheel' MSPOINTERDOWN: 'mspointerdown' RESIZE: 'resize' SEARCH: 'search' STARTCHANGE: 'startchange' // Triggered when a change is started. TOUCHSTART: 'touchstart' TOUCHMOVE: 'touchmove' TOUCHEND: 'touchend' WHEEL: 'wheel' ORTHOLAYER: 'ortholayer' MOSAICLAYER: 'mosaiclayer' DRAGGERSTART: 'draggerstart' DRAGGERDRAG: 'draggerdrag' DRAGGEREND: 'draggerend' TOOLSELECTED: 'toolselected' // Triggered when a control that is a tool has been //selectedType:
- string
- Source:
- bu/enums.js
-
FileSelectOptions
-
Options for
bu.control.FileSelect.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
upperLabelstring | undefined Text above the rest of the controls.
textboxLabelstring | undefined Text tip appearing inside the textbox element.
buttonLabelstring | undefined Label for the button element.
buttonTipLabelstring | undefined Tip label for the button element.
filesFilterstring | undefined string with filter for files to select. This string follows the rules of HTML accept attribute for input tag with type='file'.
-
GotoOptions
-
Options for
bu.control.Goto.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
textboxLabelstring | undefined Text tip appearing inside the textbox element.
buttonLabelstring | undefined Label for the button element.
buttonTipLabelstring | undefined Tip label for the button element.
-
LabelOptions
-
Options for
bu.control.Label.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
textContentstring | undefined The text content for the HTML element.
-
LayerSwitcherEventType
-
Types of events for a
bu.control.LayerSwitcher.LISTITEMCLICK: 'listitemclick' // Triggered when a checkbox or radio button is clicked. ADDLAYERCLICK: 'addlayerclick' // Triggered when add layer button is clicked. REMOVELAYERCLICK: 'removelayerclick' // Triggered when remove layer button is clicked. ZOOMTOEXTENTCLICK: 'zoomtoextentclick' // Triggered when zoom to extent button is clicked.Type:
- string
- Source:
- bu/enums.js
-
LayerSwitcherOptions
-
Options for
bu.control.LayerSwitcher.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
addButtonLabelstring | undefined Label for the add button.
removeButtonLabelstring | undefined Label for the remove button.
zoomToExtentButtonLabelstring | undefined Label for the 'zoom to extent' button.
addButtonTipLabelstring | undefined Tooltip for the add button.
removeButtonTipLabelstring | undefined Tooltip for the remove button.
zoomToExtentButtonTipLabelstring | undefined Tooltip for the 'zoom to extent' button.
filesFilterstring | undefined The files filter to show in the 'Open files' dialog, as for example '.geojson, .kml'.
allowUncheckBaselayersboolean | undefined If baselayers can be unchecked when their input button is clicked or not. Default is false.
-
MainMenuOptions
-
Options for
bu.control.MainMenu.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
buttonLabelClassstring | undefined This the class name for the label HTML element.
buttonLabelstring | undefined The label or the icon for the button element.
buttonTipLabelstring | undefined The tool tip text for the button element.
buttonHandlerfunction | undefined The Function called in the click of the button.
controlsArray.<(bu.control.Control|bu.control.ControlDefinition)> | undefined The array of controls to append to the menu.
-
MeasurementSwitcherEventType
-
Types of events for a
bu.control.MeasurementSwitcher.LISTITEMCLICK: 'listitemclick' // Triggered when a radio button is clicked.Type:
- string
- Source:
- bu/enums.js
-
ScaleLineOptions
-
Options for
bu.control.ScaleLine.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
minWidthnumber | undefined Minimum width.
unitsol.control.ScaleLineUnits | string | undefined Units.
-
ScaleLineProperty
-
Properties of a
bu.control.ScaleLine.UNITS: 'units'Type:
- string
- Source:
- bu/enums.js
-
SearchOptions
-
Options for
bu.control.Search.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
showCollapsableButtonboolean | undefined true shows control as collapsable.
collapsableButtonLabelstring | undefined label for using a text in the collapsable button. Empty for icon.
collapsableButtonTipLabelstring | undefined tooltip label for collapsable button.
searchButtonLabelstring | undefined label for using a text in the search button. Empty for icon.
searchButtonTipLabelstring | undefined tooltip label for search button.
usertokenstring | undefined usertoken to use in BlomURBEX services.
showProviderDropdownboolean | undefined true shows the provider dropdown. False is useful when only one provider is used.
minLengthnumber | undefined minimum number of chars to type and start a search.
maxItemsnumber | undefined maximum number of gecoding results to show in the autocomplete list.
typingTimeoutnumber | undefined number of milliseconds between typings to launch a new search.
-
SelectOptions
-
Options for
bu.control.Select.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
upperLabelstring | undefined Text above the rest of the controls.
textboxLabelstring | undefined Text tip appearing inside the textbox element.
initialTextstring | undefined Initial text for the textbox.
buttonLabelstring | undefined Label for the button element.
buttonTipLabelstring | undefined Tip label for the button element.
buttonHandlerfunction | undefined An optional function to execute when the selection changes.
-
SideBarButtonOptions
-
Options for
bu.control.SingleButton.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
buttonLabelClassstring | undefined This the class name for the label HTML element.
buttonLabelstring | undefined The label or the icon for the button element.
buttonTipLabelstring | undefined The tool tip text for the button element.
buttonHandlerfunction | undefined The Function called in the click of the button.
sideBarbu.control.SideBar | undefined The SideBar to open.
-
SingleButtonOptions
-
Options for
bu.control.SingleButton.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
buttonLabelClassstring | undefined This the class name for the label HTML element.
buttonLabelstring | undefined The label or the icon for the button element.
buttonTipLabelstring | undefined The tool tip text for the button element.
buttonHandlerfunction | undefined The Function called in the click of the button.
-
SliderOptions
-
Options for
bu.control.Slider.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
maxValuenumber | undefined The number for max value. Default is 100.
minValuenumber | undefined The number for min value. Default is 0.
stepnumber | undefined The number for step value. Default is 1.
initialValuenumber | undefined The number for initial value. Default is 100.
isVerticalboolean | undefined true to show the control vertically. Default is false.
showButton1boolean | undefined If the slider has a first button or not.
showButton2boolean | undefined If the slider has a second button or not.
button1Labelstring | undefined label of first button. Leave blank to use icon.
button1ClassNamestring | undefined class of the first button element.
button1LabelClassstring | undefined class for first button label. Use it for an icon.
button1TipLabelstring | undefined tip label of first button.
button2Labelstring | undefined label of second button. Leave blank to use icon.
button2ClassNamestring | undefined class of the second button element.
button2LabelClassstring | undefined class for second button label. Use it for an icon.
button2TipLabelstring | undefined tip label of second button.
changeHandlerfunction | undefined The handler to call when a drag in the control changes or the track is clicked. The handler is passed a parameter with the value of the slider inside the minValue and maxValue.
button1Handlerfunction | undefined The handler to call when the first button is clicked.
button2Handlerfunction | undefined The handler to call when the second button is clicked.
loadHandlerfunction | undefined The handler to call when the control is finally loaded.
-
SwitcherOptions
-
Options for
bu.control.Switcher.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
listArray.<string> | undefined List of strings to be shown as content of items.
listValuesArray.<string> | undefined List of strings to be shown as values of items.
listNamestring | undefined A unique name for the radio buttons.
selectedItemstring | undefined index of the initial element to be checked. Only one element can be selected.
-
TextBoxOptions
-
Options for
bu.control.TextBox.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
typestring | undefined type of the input HTML element.
labelstring | undefined The placeholder text for the textbox element. This is a text that disappears once you start typing.
initialTextstring | undefined The initial text for the textbox.
-
ToggleOptions
-
Options for
bu.control.Toggle.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
labelstring | undefined The label or the icon for the button element.
tipLabelstring | undefined The tool tip text for the button element.
checkedboolean | undefined If initially checked or not. False by default.
roundedboolean | undefined The visual style of control, if rounded (true, default) or squared (false).
handlerfunction | undefined The Function called in the click of the button.
-
ZoomOptions
-
Options for
bu.control.Zoom.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description elementElement | undefined As in
bu.control.ControlOptions.targetElement | string | bu.Viewer | undefined As in
bu.control.ControlOptions.controlsArray.<bu.ControlDefinition> | undefined As in
bu.control.ControlOptions.classNamestring | undefined The class name for the HTML element.
deltanumber | undefined The number for value that increases or decreases using the buttons.
button1Labelstring | undefined The label or the icon for the button 1 element.
button2Labelstring | undefined The label or the icon for the button 2 element.
button1TipLabelstring | undefined The tool tip text for the button 1 element.
button2TipLabelstring | undefined The tool tip text for the button 2 element.
button1Handlerfunction | undefined The Function called in the click of the button 1 with a param delta.
button2Handlerfunction | undefined The Function called in the click of the button 2 with a param delta.
Javascript API 7.x