DESI Graphics
An extension of of deck.gl along with other mapping tools.
Getting Started
To install:
npm install desi-graphics
Library
Maps
Maps.getStyles()
Maps.loadStyle()
Usage
configFields
Example of the properties contained in a weather field configuration:
"dustFineSfc": {
"defaults": "default",
"colorBars": {
"default": {
"colorLevels": [0, 1, 25, ...],
"colors": [
"rgba(0,0,0,0)",
"rgba(0,0,0,0)",
"rgb(255, 240, 204)",
...
],
"colorType": "scaleLinear",
"contourLevels": [5, 25, 50, ...],
"isLeftCap": false,
"tickAngle": -90,
"ticks": "byColorLevels",
"tickValues": []
},
"difference": {
"colorLevels": [-2, -1, -0.75, -0.5, ...],
},
"spread": {
"colorLevels": [0, 0.1, 0.25, 0.5, 0.75, 1],
},
},
"colorPrimary": "rgb(200,153,100)",
"nameLegend": "Near Surface Fine Dust",
"namePublic": "Near Surface Fine Dust",
"nameShort": "Fine Dust",
"roundto": 1,
"roundtoReadout": 0,
"units": "µg/m^3"
}
Legend Properties
Readout Properties
const shadedLayer = new ShadedLayer({
...
readout: [
{
data,
decimals,
interpolate,
prependText,
units,
valueFormatter
}
]
})