User Interface
UI base class
- class UI(baseLayers, options)
Base class for VisiOmatic dialog controls.
- Arguments:
baseLayers (Array.<VTileLayer>) -- Array of layers
options (object) -- Options.
options.title (string) -- Layer title. Defaults to the basename of the tile URL with extension removed.
options.collapsed (boolean) -- Start dialog in the collapsed state?
options.position (boolean) -- Position of the dialog on the map.
- Returns:
UI -- VisiOmatic UI instance.
- static UI._addButton(className, parent, subClassName, title, fn)
Add a new button to the provided parent element.
- Arguments:
className (string) -- Class name for the button.
parent (object) -- The parent element.
subClassName (string) -- Sub-class name for the button (will be combined with ClassName to generate a unique element id).
title (string) -- Title of the button (for, e.g., display as a tooltip).
fn (UI~controlCallback) -- Callback function for when the button is pressed.
- Returns:
object -- The newly created button.
- static UI._addColorPicker(className, parent, subClassName, defaultColor, storageKey, title, fn)
Add a new color picker to the provided parent element.
- Arguments:
className (string) -- Class name for the color picker.
parent (object) -- The parent element.
subClassName (string) -- Sub-class name for the color picker (will be combined with ClassName to generate a unique element id).
defaultColor (string) -- Default color picked by default.
storageKey (string) -- String to be used as a local browser storage key.
title (string) -- Title of the color picker (for, e.g., display as a tooltip).
fn (UI~colorCallback) -- Callback function for when a color has been picked.
- Returns:
object -- The newly created color picker.
- static UI._addDialogBox(id)
Add a new dialog box to the UI.
- Arguments:
id (string) -- DOM id property of the box element.
- Returns:
object -- The newly created dialog box.
- static UI._addDialogElement(line)
Add a new dialog element to the provided dialog line.
- Arguments:
line (object) -- The destination dialog line.
- Returns:
object -- The newly created dialog element.
- static UI._addDialogLine(label, dialogBox)
Add a new dialog line to the provided dialog box.
- Arguments:
label (string) -- Default text in the dialog line.
dialogBox (object) -- The destination dialog box.
- Returns:
object -- The newly created dialog line.
- static UI._addLayerItem(obj)
Add control item element for the provided layer parent object.
- Arguments:
obj (object) -- Layer parent object.
- Returns:
object -- The control item element.
- static UI._addNumericalInput(layer, attr, box, label, title, initValue, step, min, max, fn)
- Add a new numerical input widget to the provided box element for
updating a layer attribute .
- Arguments:
layer (VTileLayer) -- Layer affected by the numerical update.
attr (string) -- Name of the (numerical) layer attribute to be updated.
box (object) -- The parent box element.
label (string) -- Text for the created dialog line.
title (string) -- Title of the numerical input (for, e.g., display as a tooltip).
initValue (number) -- Initial numerical value.
step (number) -- Starting step value.
min (number) -- Minimum value.
max (number) -- Maximum value.
fn (UI~layerCallback) -- Callback function for when the numerical input has been updated.
- Returns:
object -- The newly created numerical input.
- static UI._addRadioButton(className, parent, value, checked, title, fn)
Add a new radio button to the provided parent element.
- Arguments:
className (string) -- Class name for the radio button.
parent (object) -- The parent element.
value (*) -- Value associated with the radio button (e.g., button index or label).
checked (boolean) -- Initial status of the button.
title (string) -- Title of the button (for, e.g., display as a tooltip).
fn (UI~controlCallback) -- Callback function for when the button is pressed.
- Returns:
object -- The newly created radio button.
- static UI._addSelectMenu(className, parent, Item, disabled, selected, title, fn)
Add a new selection menu to the provided parent element.
- Arguments:
className (string) -- Class name for the selection menu.
parent (object) -- The parent element.
Item (Array.<string>) -- list.
disabled (Array.<boolean>) -- Item-disabling flag list.
selected (number) -- Selected item index.
title (string) -- Title of the selection menu (for, e.g., display as a tooltip).
fn (UI~controlCallback) -- Callback function for when an item is selected.
- Returns:
object -- The newly created selection menu.
- static UI._addSwitchInput(layer, attr, box, label, title, checked)
Add a new layer attribute flip switch to the provided box element.
- Arguments:
layer (VTileLayer) -- Layer affected by the flip switch action.
attr (string) -- Name of the (boolean) layer attribute to be flipped.
box (object) -- The parent box element.
label (string) -- Text for the created dialog line.
title (string) -- Title of the flip switch (for, e.g., display as a tooltip).
checked (boolean) -- Initial switch position.
- Returns:
object -- The newly created flip switch.
- static UI._checkVisiomatic(e)
Check that the layer being loaded is a VisiOmatic layer.
- Arguments:
e (leaflet.LayerEvent) -- Leaflet layer event object.
- static UI._collapse()
Collapse a DOM element (by removing '-expanded' from its class name).
- static UI._expand()
Expand a DOM element (by adding '-expanded' to its class name).
- static UI._findActiveBaseLayer()
Find the base VisiOmatic layer currently active on the map.
- Returns:
object -- The active VisiOmatic layer, or undefined otherwise.
- static UI._initDialog()
Initialize the UI dialog (dummy in the base class, just a placeholder).
- static UI._onLayerChange(e)
Trigger layer list update when an (overlay) layer is added or removed.
- Arguments:
e (leaflet.LayerEvent) -- Leaflet layer event object.
- static UI._resetDialog()
Reset the UI dialog.
- static UI._spinboxStep(min, max)
- Compute a step for the spinbox widget from the provided min and max
values.
- Arguments:
min (number) -- Minimum value.
max (number) -- Maximum value.
- Returns:
number -- The computed step value.
- static UI._updateInput(element, value)
Update the value stored in a widget element.
- Arguments:
element (object) -- Widget element.
value (*) -- New value.
- static UI._updateLayerList()
Update the control list of layers.
- Returns:
object -- This (control).
- static UI.addLayer(layer, name, index)
Add (overlay) layer from the present control.
- Arguments:
layer (leaflet.Layer) -- Layer to be added.
name (string) -- Layer name.
index (number) -- Layer depth index.
- Returns:
object -- This (control).
- static UI.addTo(dest)
Add the control to the map or to a sidebar.
- Arguments:
dest (object) -- Destination map or sidebar.
- Returns:
object -- Destination object.
- static UI.getActiveBaseLayer()
Get the base layer currently active on the map.
- Returns:
object -- Tile- or overlay layer.
- static UI.onAdd(map)
Add the control dialog directly to the map.
- Arguments:
map (object) -- Leaflet map the control has been added to.
- Returns:
object -- The newly created container of the dialog.
- static UI.removeLayer(layer)
Remove (overlay) layer from the present control.
- Arguments:
layer (leaflet.Layer) -- Layer to be removed.
- Returns:
object -- This (control).
- UI.colorCallback()
Callbacks for color picker changes.
- UI.controlCallback(UI)
Callbacks for UI control changes.
- Arguments:
UI (object) -- control object.
- UI.layerCallback(layer)
Callbacks for layer attribute changes.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
See also
Leaflet API reference]{@link https://leafletjs.com/reference.html#control}
Catalog UI
- class CatalogUI(catalogs, options)
Create a VisiOmatic dialog for catalog queries and catalog overlays.
- Arguments:
catalogs (Array.<Catalog>) -- Array of catalogs
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
options.color (string) -- Default catalog overlay color.
options.timeOut (number) -- Time out delay for catalog queries, in seconds.
options.authenticate (boolean) -- Force authentication for querying catalogs?
- Returns:
CatalogUI -- VisiOmatic CatalogUI instance.
- CatalogUI.defaultCatalogs
type: Array.<Catalog>
Default array of catalogs.
- static CatalogUI._getCatalog(catalog, timeout)
Query catalog.
- Arguments:
catalog (Catalog) -- Catalog.
timeout (number) -- Query time out delay, in seconds. Defaults to no time out.
- static CatalogUI._initDialog()
Initialize the catalog query dialog.
- static CatalogUI._loadCatalog(catalog, templayer, response)
Load catalog data and display the overlay layer.
- Arguments:
catalog (Catalog) -- Catalog.
templayer (leaflet.Layer) -- "Dummy" layer to activate a spinner sign.
response (object) -- Response object from the fetch() request.
- static CatalogUI._resetDialog()
Reset the catalog query dialog.
See also
{@link UI} for additional control options.
Channel UI
- class ChannelUI(options)
Create a VisiOmatic dialog for managing the VisiOmatic layer channels.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
options.color ('grey'|'jet'|'cool'|'hot') -- Default color map in
'mono'
mixing mode.options.mixingMode ('mono'|'color') -- Mixing mode: single channel (
'mono'
) or color mix ('color'
). Defaults to [layer settings]{@link VTileLayer}.
- Returns:
ChannelUI -- Instance of a channel mixing user interface.
- static ChannelUI._activateChanElem(trashElem, layer, channel)
- Add listener to a channel element for setting the current channel
of a given VisiOmatic layer.
- Arguments:
trashElem (object) -- Trash element.
layer (VTileLayer) -- VisiOmatic layer.
channel (number) -- Image channel.
- static ChannelUI._activateTrashElem(trashElem, layer, channel)
- Add listener to a trash element for blackening the current channel color
of a given VisiOmatic layer.
- Arguments:
trashElem (object) -- Trash element.
layer (VTileLayer) -- VisiOmatic layer.
channel (number) -- Image channel.
- static ChannelUI._addMinMax(layer, channel, box)
- Add a pair of spinboxes for setting the min and max clipping limits of
pixel values.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
channel (number) -- Image channel.
box (object) -- The parent box element.
- static ChannelUI._gotoChannel(layer, channel=0)
Set current channel.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
channel (number) -- Image channel.
- static ChannelUI._initColorDialog(layer, box)
Initialize the
'color'
flavor of the channel mixing dialog.- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
box (object) -- The parent box element.
- static ChannelUI._initDialog()
Initialize the channel mixing dialog.
- static ChannelUI._initMonoDialog(layer, box)
Initialize the
'mono'
flavor of the channel mixing dialog.- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
box (object) -- The parent box element.
- static ChannelUI._pauseAnimation(layer)
Pause Animation.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
- static ChannelUI._playAnimation(layer, {boolean))
Play Animation by iterating over channels/slices.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
{boolean) -- [reverse=false] Play in reverse?
- static ChannelUI._updateChannel(layer, channel, {boolean))
Set/update the channel controls for a given channel.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
channel (number) -- Image channel.
{boolean) -- [updateColor=false] Update Color patch element?
- static ChannelUI._updateChannelList(layer)
Update the list of channels in the dialog.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
- static ChannelUI._updateChannelMix(layer, channel, channel_rgb)
- Update the color mixing matrix with the RGB contribution of a given
channel and redraw the VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
channel (number) -- Image channel.
channel_rgb (RGB) -- RGB color.
- static ChannelUI._updateColPick(layer, channel)
Update the color picker value based on the given channel color.
- Arguments:
layer (number) -- VisiOmatic layer.
channel (number) -- Image channel.
- static ChannelUI.loadSettings(layer, settings, mode, keepChannel=false)
Copy channel mixing settings to a VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
settings (object) -- Object where to save the settings properties.
mode ('mono'|'color') -- Mixing mode: single channel (
'mono'
) or color mix ('color'
).keepChannel (boolean) -- Overwrite the current layer channel?
- static ChannelUI.saveSettings(layer, settings, mode)
Copy channel mixing settings from a VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
settings (object) -- Object where to save the settings properties.
mode ('mono'|'color') -- Mixing mode: single channel (
'mono'
) or color mix ('color'
).
See also
{@link UI} for additional control options.
Doc UI
- class DocUI(url, options)
Create a VisiOmatic dialog for the online documentation.
- Arguments:
url (string) -- Documentation URL.
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
options.pdflink (string) -- URL of the PDF version of the documentation.
- Returns:
DocUI -- Instance of a VisiOmatic documentation user interface.
Navigate back in the IFrame.
See also
{@link http://stackoverflow.com/a/7704305}.
Disable navigation buttons on both sides of history positions.
Navigate forward in the IFrame.
See also
{@link http://stackoverflow.com/a/7704305}.
Navigate home in the IFrame.
See also
{@link http://stackoverflow.com/a/7704305}.
- static DocUI._initDialog()
Initialize the documentation dialog.
Triggered on IFrame load.
See also
{@link http://stackoverflow.com/a/7704305}.
Update navigation buttons.
- Arguments:
newPos (number) -- Position in navigation history.
See also
{@link http://stackoverflow.com/a/7704305}.
See also
{@link UI} for additional control options.
Image UI
- class ImageUI(options)
Create a VisiOmatic dialog for setting the VisiOmatic layer rendering.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
- Returns:
ImageUI -- Instance of a user interface for the rendering preferences.
- static ImageUI._initDialog()
Initialize the rendering preference dialog.
- static ImageUI.loadSettings(layer, settings)
Copy rendering settings to a VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
settings (object) -- Object where to save the settings properties.
- static ImageUI.saveSettings(layer, settings)
Copy rendering settings from a VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
settings (object) -- Object where to save the settings properties.
See also
{@link UI} for additional control options.
Preferences UI
- class PreferencesUI(options)
Create a VisiOmatic dialog for managing preferences.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
- Returns:
PreferencesUI -- Instance of a VisiOmatic preference interface.
- static PreferencesUI._initDialog()
Initialize the Preferences dialog.
See also
{@link UI} for additional control options.
Profile UI
- class ProfileUI(options)
Create a VisiOmatic dialog for plotting image profiles and spectra.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
options.profile (boolean) -- Include Profile plotting dialog?
options.profileColor (string) -- Default profile overlay color
options.spectrum (boolean) -- Include spectrum plotting dialog?
options.spectrumColor (string) -- Default spectrumoverlay color
options.chartZoomOptions (string) -- Default options for the chartjs-plugin-zoom Chart plug-in.
- Returns:
ProfileUI -- Instance of a VisiOmatic profile and spectrum plotting user interface.
- static ProfileUI._extractAverage(layer, rawprof, channel)
- Extract the average pixel value in a given channel from the multichannel
profiles of a given VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
rawprof (Array.<number>) -- Input "raw" (multiplexed) image profiles.
channel (number) -- Image channel.
- Returns:
number -- Average value.
- static ProfileUI._extractProfile(layer, rawprof, channel)
- Extract the image profile in a given channel from the multichannel
profiles of a given VisiOmatic layer.
- Arguments:
layer (VTileLayer) -- VisiOmatic layer.
rawprof (Array.<number>) -- Input "raw" (multiplexed) image profiles.
channel (number) -- Image channel.
- Returns:
Array.<number> -- Extracted image profile.
- static ProfileUI._getDistanceString()
Compute distance and set up measurement string.
- Returns:
string -- Measurement string.
- static ProfileUI._initDialog()
Initialize the profile/spectrum plotting dialog.
- static ProfileUI._plotProfile(response)
Load and plot image profile data.
- Arguments:
response (object) -- HTTP response object.
- static ProfileUI._plotSpectrum(self, httpRequest)
Load and plot spectrum data.
- Arguments:
self (object) -- Calling control object (
this
).httpRequest (object) -- HTTP request.
- static ProfileUI._profileEnd()
End interactive profile line definition and do the profile query.
- static ProfileUI._updateLine(e)
Update plotted line parameters.
- Arguments:
e (event) -- Triggering event (e.g.,
'drag'
).
See also
{@link https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html}
{@link UI} for additional control options.
Region UI
- class RegionUI(regions, options)
- Create a VisiOmatic dialog for overlaying region and Point of Interest
(PoI).
- Arguments:
regions (Array.<region>) -- Regions to overlay.
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
options.color (string) -- Default region overlay color.
- Returns:
ProfileUI -- Instance of a VisiOmatic profile and spectrum plotting user interface.
- static RegionUI._getRegion(region, timeout)
Query a region.
- Arguments:
region (region) -- Region.
timeout (number) -- Query time out delay, in seconds. Defaults to no time out.
- static RegionUI._initDialog()
Initialize the region overlay dialog.
- static RegionUI._loadRegion(region, templayer, self, httpRequest)
Load region data and display the overlay layer.
- Arguments:
region (region) -- Region.
templayer (leaflet.Layer) -- "Dummy" layer to activate a spinner sign.
self (object) -- Calling control object (
this
).httpRequest (object) -- HTTP request.
- static RegionUI._resetDialog()
Reset the region query dialog (do nothing actually).
- RegionUI.drawCallback(feature, latlng)
Callback for custom drawing of a GeoJSON point feature.
- Arguments:
feature (object) -- GeoJSON feature.
latlng (LatLng) -- World coordinates of the point.
See also
{@link UI} for additional control options.
- regionUI(regions, options)
Instantiate a VisiOmatic dialog for region overlays.
- Arguments:
regions (Array.<region>) -- Regions to overlay.
options (object) -- Options.
- Returns:
RegionUI -- Instance of a VisiOmatic region interface.
Snapshot UI
- class SnapshotUI(options)
- Create a VisiOmatic dialog for taking snapshots of the current
screen/image.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the dialog window or panel.
- Returns:
SnapshotUI -- Instance of a VisiOmatic snapshot interface.
- static SnapshotUI._initDialog()
Initialize the snapshot dialog.
See also
{@link UI} for additional control options.
Coords
- class Coords(options)
Create a new coordinate display/control interface.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the control.
options.position ('bottomleft'|'bottomright'|'topleft'|'topright') -- Position of the coordinate display.
options.coordinates (Array.<coordinate>) -- Coordinate settings for every instance of coordinates.
options.centerQueryKey (string) -- Web query key for map centering.
options.fovQueryKey (string) -- Web query key for setting the Field of View.
options.sesameURL (string) -- URL for Sesame queries.
- Returns:
Coords -- Instance of a coordinate display/control interface.
- static Coords._checkVisiomatic(e)
Check that the layer being loaded is a VisiOmatic layer.
- Arguments:
e (leaflet.LayerEvent) -- Leaflet layer event object.
- static Coords._getCoordinates(self, httpRequest)
Move map to the sky coordinates resolved by Sesame service.
- Arguments:
self (object) -- Calling control object (
this
).httpRequest (object) -- HTTP request.
- static Coords._initDialog()
Initialize the coordinate display/control dialog.
- static Coords._onDrag(e)
Update coordinates when the map is being dragged.
- Arguments:
e (leaflet.LayerEvent) -- Leaflet layer event object.
- static Coords.onRemove(map)
Remove map dragging event when the coordinate display/control is removed.
- Arguments:
map (leaflet.map) -- The parent map.
- static Coords.panTo(str)
Move map to a given source or coordinate position.
- Arguments:
str (string) -- Source name or coordinates.
ExtraMap
- class ExtraMap(layer, options)
Create an extra map display/control interface.
- Arguments:
layer (leaflet.Layer) -- Layer displayed in the extra map.
options (object) -- Options.
options.title (string) -- Title of the map.
options.position ('bottomleft'|'bottomright'|'topleft'|'topright') -- Position of the map.
options.width (number) -- Map width in screen pixels.
options.height (number) -- Map height in screen pixels.
options.width -- Map width in collapsed state, in screen pixels.
options.height -- Map height in collapsed state, in screen pixels.
options.toggleDisplay (boolean) -- Add a map toggle display button?
options.autoToggleDisplay (boolean) -- Automatically toggle the map display when hovering the map icon?
options.zoomLevelFixed (number|false) -- Fixed extra map zoom level. Defaults to dynamic zooming.
options.zoomLevelOffset (number) -- Zoom level offset with respect to that of the main map.
options.zoomAnimation (boolean) -- Animate when zooming in/out (warning: adds some lag)?
options.aimingRectOptions (rectangleOptions) -- Display options for the aiming rectangle.
options.shadowRectOptions (rectangleOptions) -- Display options for the shadow rectangle.
- Returns:
ExtraMap -- Instance of an extra map display/control interface.
- static ExtraMap._addButton()
Add a button to the extra map window/icon.
- Returns:
object -- Button element.
- static ExtraMap._addToggleButton()
Add a display toggle button to the extra map window/icon.
- static ExtraMap._decideMinimized()
Decide if the extra map must be minimized.
- static ExtraMap._decideZoom(fromMaintoExtra)
Decide the extra map zoom level depending on current conditions.
- Arguments:
fromMaintoExtra (boolean) -- Is zooming triggered from the main map?
- static ExtraMap._isDefined(value)
Testing for
undefined
type.- Arguments:
value (number) -- Input.
- Returns:
boolean -- True if the input value is strictly
undefined
.
- static ExtraMap._isInteger(value)
Testing for
number
type.- Arguments:
value (number) -- Input.
- Returns:
boolean -- True if the input value is a number.
- static ExtraMap._isZoomLevelFixed(e)
Update the main map as the extra map has stopped moving.
- Arguments:
e (leaflet.Event) -- Extra map
moveend
event.
- static ExtraMap._minimize()
Minimize the extra map window.
- static ExtraMap._onExtraMapMoveStarted(e)
Set up the aiming polygon footprint as the extra map starts moving.
- Arguments:
e (leaflet.Event) -- Extra map
movestart
event.
- static ExtraMap._onExtraMapMoved(e)
Update the main map as the extra map has stopped moving.
- Arguments:
e (leaflet.Event) -- Extra map
moveend
event.
- static ExtraMap._onExtraMapMoving(e)
Update the shadow polygon footprint as the extra map is moving.
- Arguments:
e (leaflet.Event) -- Extra map
move
event.
- static ExtraMap._onMainMapMoved(e)
Follow the main map after it has moved.
- Arguments:
e (leaflet.Event) -- Main map
moveend
event.
- static ExtraMap._onMainMapMoving(e)
Replicate the main map moves using the aiming polygon footprint.
- Arguments:
e (leaflet.Event) -- Main map
move
event.
- static ExtraMap._restore()
Restore the extra map window.
- static ExtraMap._setDisplay(minimize)
Toggle display of the extra map window.
- Arguments:
minimize (boolean) -- Minimize the map?
- static ExtraMap._toggleDisplayButtonClicked()
Actions performed when the display toggle button is clicked.
- static ExtraMap.changeLayer(layer)
Update content when the layer is changed.
- Arguments:
layer (leaflet.Layer) -- The new layer.
- static ExtraMap.onAdd(map)
- Add the extra map display/control directly to the map and wait for
the layer to be ready.
- Arguments:
map (object) -- Leaflet map the control has been added to.
- Returns:
object -- The newly created container of the control.
- static ExtraMap.onRemove(map)
Remove map move event when the extra map display/control is removed.
- Arguments:
map (leaflet.map) -- The parent map.
FullScreen
- class FullScreen(options)
Create a new full-screen toggle button.
- Arguments:
options (object) -- Options.
options.title (string) -- Title of the panel.
options.position ('bottomleft'|'bottomright'|'topleft'|'topright') -- Position of the full-screen button.
options.forceSeparateButton (boolean) -- Sidebar button separate from zoom control?
- Returns:
FullScreen -- Full screen toggle control.
- static FullScreen._addButton(title, className, container, fn, context)
Add a button
- Arguments:
title (string) -- Title of the button.
className (string) -- Class name of the button.
container (object) -- Element containing the button.
fn (function) -- Callback function to call when the button is pressed.
context (object) -- Context (this) for the callback function.
- Returns:
object -- New link (button) element.
- static FullScreen._handleEscKey()
Exit full-screen mode when ESC key is pressed.
- static FullScreen.onAdd(map)
Add this full screen toggle to the specified map.
- Arguments:
map (L.Map)
- Returns:
object -- Element containing the full screen toggle button.
- static FullScreen.toogleFullScreen()
Toggle full-screen mode.
Reticle
- class Reticle()
Create a new reticle.
- Returns:
Reticle -- Instance of a reticle.
- static Reticle.onRemove(map)
Remove the reticle.
- Arguments:
map (leaflet.map) -- The parent map.
- reticle()
Instantiate a reticle.
- Returns:
Reticle -- Instance of a reticle.
Examples:
const ret = reticle().addTo(map);
Widgets
- control.widget.FlipSwitch.flipSwitch(parent, options)
Instantiate a flip switch widget.
- Arguments:
parent (object) -- Parent element.
options (object) -- Options: see {@link FlipSwitch}
- Returns:
FlipSwitch -- Flip switch widget element.
Examples:
... const elem = DomUtil.create('div', 'myelement', divParent); const flipElem = flipSwitch(elem, {checked: true});
- control.widget.Spinbox.spinbox(parent, options)
Instantiate a spinbox widget.
- Arguments:
parent (object) -- Parent element.
options (object) -- Options: see {@link Spinbox}
- Returns:
Spinbox -- Spinbox widget element.
Examples:
... const elem = DomUtil.create('div', 'myelement', divParent); const spinElem = Spinbox(elem, {initValue: 42.0, step: 2.0});