SourceTermAnalysisSystem_vue/node_modules/ol-wind
2026-05-15 10:22:44 +08:00
..
LICENSE 提交node_modules 2026-05-15 10:22:44 +08:00
package.json 提交node_modules 2026-05-15 10:22:44 +08:00
README.md 提交node_modules 2026-05-15 10:22:44 +08:00

ol-wind

openlayers wind layer adapter

Usage

Install

pnpm i ol-wind -S

Example

import { WindLayer } from 'ol-wind';

const windLayer = new WindLayer(res, {
    forceRender: false,
    windOptions: {
      // colorScale: scale,
      velocityScale: 1 / 20,
      paths: 5000,
      // eslint-disable-next-line no-unused-vars
      colorScale: () => {
        // console.log(m);
        return '#ff473c';
      },
      width: 3,
      // colorScale: scale,
      generateParticleOption: false
    },
    // map: map,
    // projection: 'EPSG:4326'
});
    
console.log(map, windLayer);
    
map.addLayer(windLayer);