Home

Weather Data Renderer Documentation

The project is written in plain javascript but uses jsdoc comments for type checking and documentation. The type checking is done by using //@ts-check at the top of the file.

When opened with Visual Studio Code the typescript compiler checks for errors and warnings in the code automatically, and the documentation can be generated with the jsdoc tool.

Usage

The index.html and the web/web-example.js provide a working example of how to use the renderer. The renderer is a class that can be instantiated with a mapbox map object, a layer name and a layer name to insert the layer before.

let renderer = new RadarRenderer(mapboxMap, "layername", "insertBeforeLayer");
renderer.setColormap([/* colormap data */]);
renderer.setFilter(10, 50);
renderer.draw({/* radar data */});

// Example playback
const scans = [/* radar scans data */];
let idx = 0;
setInterval(() => {
    renderer.draw(scans[++idx % scans.length]);
}, 250);