This is an OpenLayers port of leaflet-velocity-ts.
let velocity = new VelocityLayer({
displayValues: true,
displayOptions: {
velocityType: 'Wind',
position: 'bottomleft',
emptyString: 'No velocity data',
angleConvention: 'bearingCW',
displayPosition: 'bottomleft',
displayEmptyString: 'No velocity data',
speedUnit: 'm/s'
},
data: data, // see demo/*.json, or wind-js-server for example data service
// OPTIONAL
minVelocity: 0, // used to align color scale
maxVelocity: 10 // used to align color scale
});
velocity.addToMap(map);
npm run build
MIT License (MIT)