WeatherLayers
DemoIntegrationsDocsStatus
  • Overview
  • WeatherLayers GL
    • Quick Start
    • Layers
      • Particle Layer
      • Raster Layer
      • Contour Layer
      • HighLow Layer
      • Front Layer
      • Grid Layer
      • Data Loading
      • Data Properties
      • Style Properties
    • Controls
      • Legend Control
      • Timeline Control
      • Tooltip Control
      • Attribution Control
      • Logo Control
      • Control
    • Types
    • Functions
    • Data Sources
    • Security
    • Troubleshooting
    • Pricing
    • Changelog
    • Roadmap
  • WeatherLayers Cloud
    • Quick Start
    • Client
    • Types
    • Security
    • Troubleshooting
    • Datasets
    • Pricing
    • Changelog
    • Roadmap
  • Contact
Powered by GitBook
On this page
  • Example - supported file formats
  • Example 2 - custom file formats
  1. WeatherLayers GL
  2. Layers

Data Loading

Example - supported file formats

import { Deck } from '@deck.gl/core';
import WeatherLayers from 'weatherlayers-gl';

// load data
const image = await WeatherLayers.loadTextureData(url);

const deckgl = new Deck({
  layers: [
    new WeatherLayers.XxxLayer({
      image: image,
    }),
  ],
});

Example 2 - custom file formats

import { Deck } from '@deck.gl/core';
import WeatherLayers from 'weatherlayers-gl';

// load data
const image = { data: new Float32Array(...), width: ..., height: ... };

const deckgl = new Deck({
  layers: [
    new WeatherLayers.XxxLayer({
      image: image,
    }),
  ],
});

Last updated 1 year ago