Layers
VTileLayer
- class VTileLayer(url, options)
Create a layer with tiled image data queried from a VisiOmatic server.
- Arguments:
url (string) -- URL of the tile server
options (object) -- Options.
options.title (string) -- Layer title. Defaults to the image filename with extension removed followed by the OBJECT name if available.
options.setTitleBar (boolean) -- Update the document / webpage title using the layer title.
options.crs (leaflet.CRS|WCS) -- Coordinate Reference or World Coordinate System: extracted from the data header if available or raw pixel coordinates otherwise.
options.center (string) -- World coordinates (either in RA,Dec decimal form or in
hh:mm:ss.s±dd:mm:ss.s
sexagesimal format), or any [Sesame]{@link http://cds.u-strasbg.fr/cgi-bin/Sesame}-compliant identifier defining the initial centering of the map upon layer initialization. Sexagesimal coordinates and identifier strings are sent to the Sesame resolver service for conversion to decimal coordinates. Assume x,y pixel coordinates if WCS information is missing. Defaults to image center.options.fov (number) -- Field of View (FoV) covered by the map upon later initialization, in world coordinates (degrees, or pixel coordinates if WCS information is missing). Defaults to the full FoV.
options.minZoom (number) -- Minimum zoom factor.
options.maxZoom (number) -- Maximum zoom factor.
options.maxNativeZoom (number) -- Maximum native zoom factor (including resampling).
options.noWrap (boolean) -- Deactivate layer wrapping.
options.brightness (number) -- Brightness level.
options.contrast (number) -- Contrast factor.
options.colorSaturation (number) -- Color saturation for multi-channel data (0.0: B&W, >1.0: enhance).
options.gamma (number) -- Display gamma.
options.cMap (string) -- Colormap for single channels or channel combinations. Valid colormaps are
'grey'
,'jet'
,'cold'
and'hot'
.options.invertCMap (boolean) -- Invert Colormap or color mix (like a negative).
options.quality (number) -- JPEG encoding quality in percent.
options.mixingMode (string) -- Channel mixing mode. Valid modes are
'mono'
(single-channel) and'color'
.options.channelColors (Array.<RGB>) -- RGB contribution of each channel to the mixing matrix. Defaults to
rgb(0.,0.,1.), rgb(0.,1.,0.), rgb(1.,0.,0.), rgb(0.,0.,0.), ...]
options.channelLabels (Array.<string>) -- Channel labels. Defaults to
['Channel #1', 'Channel #2', ...]
.options.channelLabelMatch (string) -- Regular expression matching the labels of channels that are given a color by default.
options.channelUnits (Array.<string>) -- Channel units. Defaults to
['ADU','ADU',...]
.options.minMaxValues (Array.<Array.<number>>) -- Pairs of lower, higher clipping limits for every channel. Defaults to values extracted from the data header if available or
[[0.,255.], [0.,255.], ...]
otherwise.options.channel (number) -- Default active channel index in mono-channel mixing mode.
options.framerate (number) -- Default animation framerate.
options.sesameURL (string) -- URL of the [Sesame]{@link http://cds.u-strasbg.fr/cgi-bin/Sesame} resolver service.
options.credentials (string) -- For future use.
- Returns:
VTileLayer -- VisiOmatic TileLayer instance.
Examples:
const map = L.map('map'), url = '/tiles?FIF=example.fits', layer = new VTileLayer(url, {cmap: 'jet'}); layer.addTo(map);
- VTileLayer.visio
type: object
VisiOmatic-specific TileLayer properties.
- VTileLayer.metaload
Fired when the image metadata have been loaded.
- VTileLayer.visioDefault
type: object
Default _server_ rendering parameters (to shorten tile query strings).
- static VTileLayer._addToMap(map)
Executed once the layer to be added to the map is ready.
- Arguments:
map (object) -- Leaflet map to add the layer to.
- static VTileLayer._gammaCorr(val)
Apply gamma expansion to the provided input value.
- Arguments:
val (number) -- Input value.
- Returns:
number -- gamma-compressed value.
- static VTileLayer._initTile(tile)
Initialize a tile.
- Arguments:
tile (object) -- The tile.
- static VTileLayer._isValidTile(coords)
Tell if a tile at the given coordinates should be loaded.
- Arguments:
coords (point) -- Tile coordinates.
- Returns:
boolean --
true
if tile should be loaded,false
otherwise.
- static VTileLayer._readVisioKey(str, keyword, regexp)
Note
Deprecated: since version 3.0
Decode the input string as a 'keyword:value' pair.
- Arguments:
str (string) -- Input string.
keyword (string) -- Input keyword.
regexp (string) -- Regular expression for decoding the value.
- Returns:
* -- Decoded output.
- static VTileLayer._refreshTileUrl(tile, url)
Replace a tile.
- Arguments:
tile (object) -- The tile.
url (string) -- The tile URL.
See also
{@link https://github.com/Leaflet/Leaflet/issues/6659}
- static VTileLayer._setAttr(attr, value, fn)
Update layer attribute and redraw layer content.
- Arguments:
attr (string) -- Name of the (numerical) layer attribute to be updated.
value (*) -- New value.
fn (UI~layerCallback) -- Optional additional callback function.
- static VTileLayer.addTo(map)
Add the layer to the map.
- Arguments:
map (object) -- Leaflet map to add the layer to.
- static VTileLayer.createTile(coords, done)
Create a tile at the given coordinates.
- Arguments:
coords (point) -- Tile coordinates.
done (boolean) -- Callback function called when the tile has been loaded.
- Returns:
object -- The new tile.
- static VTileLayer.getChannelColor(channel)
Get color for the given channel.
- Arguments:
channel (number) -- Input channel.
- Returns:
string -- color string.
- static VTileLayer.getMetaData(url)
Get metadata describing the tiled image at the provided URL.
- Arguments:
url (string) -- The full tile URL.
- static VTileLayer.getTileSettingsURL()
Generate the settings part of a tile query URL based on current settings.
- Returns:
string -- The tile settings URL.
- static VTileLayer.getTileUrl(coords)
Generate a tile URL from its coordinates
- Arguments:
coords (point) -- Tile coordinates.
- Returns:
string -- The tile URL.
- static VTileLayer.redraw()
Redraw a tile without flickering.
See also
{@link https://github.com/Leaflet/Leaflet/issues/6659}
- static VTileLayer.rgbToMix(channel, rgb)
- Update the color mixing matrix with the RGB contribution of a given
channel.
- Arguments:
channel (number) -- Input channel.
rgb (RGB|false) -- RGB color. False deletes the channel.
- static VTileLayer.setColor()
- RGB colors and saturation settings define mixing matrix elements in
'color'
mode
- static VTileLayer.setMono()
- The current channel index defines the color mixing matrix elements in
'mono'
mode
- static VTileLayer.updateMix(layer)
- RGB colors and saturation settings define mixing matrix elements in
'color'
mode
- Arguments:
layer (VTileLayer) -- VisiOmatic layer ("this" is used if not provided)