Front Layer
Example


Data Properties
data
dataStyle Properties
getType
getTypegetPath
getPathwidth
widthcoldColor
coldColorwarmColor
warmColoroccludedColor
occludedColorLast updated
import { Deck } from '@deck.gl/core';
import * as WeatherLayers from 'weatherlayers-gl';
// load data
const frontData = [
{ type: WeatherLayers.FrontType.COLD, path: [...] },
{ type: WeatherLayers.FrontType.WARM, path: [...] },
{ type: WeatherLayers.FrontType.OCCLUDED, path: [...] },
{ type: WeatherLayers.FrontType.STATIONARY, path: [...] },
];
const deckgl = new Deck({
layers: [
new WeatherLayers.FrontLayer({
id: 'front',
// data properties
data: frontData,
// style properties
getType: d => d.type,
getPath: d => d.path,
coldColor: [37, 99, 235], // Tailwind CSS blue-600
warmColor: [220, 38, 38], // Tailwind CSS red-600
occludedColor: [124, 58, 237], // Tailwind CSS violet-600
}),
],
});