Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
maptalks.wind
Advanced tools
maptalks.wind
is a maptalks layer used to rendering the globle wind data which get from the US National Weather Service publishes weather data for the whole globe, known as GFS. This project is heavily inspired by the work of https://github.com/mapbox/webgl-wind.
npm install maptalks.wind
.https://unpkg.com/maptalks.wind/dist/maptalks.wind.js
<script type="text/javascript" src="../maptalks.wind.js"></script>
<script>
var map = new maptalks.Map({});
var windData = {
date: "2016-11-20T00:00Z",
height: 180,
image: '2016112000.png',
source: "http://nomads.ncep.noaa.gov",
uMax: 26.8,
uMin: -21.32,
vMax: 21.42,
vMin: -21.57,
width: 360
};
var windlayer = new maptalks.WindLayer('wind', {
data : windData
}).addTo(map);
</script>
import { WindLayer } from 'maptalks.wind';
const windData = {
date: "2016-11-20T00:00Z",
height: 180,
image: '2016112000.png',
source: "http://nomads.ncep.noaa.gov",
uMax: 26.8,
uMin: -21.32,
vMax: 21.42,
vMin: -21.57,
width: 360
};
const windlayer = new WindLayer('wind', {
data : windData
});
import { WindLayer } from 'maptalks.wind';
const windlayer = new WindLayer('wind', {
data : '../path/gfs.json'
});
OR
const windData = {...};
const windlayer = new WindLayer('wind', {
data : windData
});
IE 9-11, Chrome, Firefox, other modern and mobile browsers.
Constructor
WindLayer
is a subclass of maptalks.Layer and inherits all the methods of its parent.
new maptalks.WindLayer(id, options)
setWind(data)
set the wind data for windlayer
windlayer.setWind(data);
{
height: 180,
image: '2016112000.png',
uMax: 26.8,
uMin: -21.32,
vMax: 21.42,
vMin: -21.57,
width: 360
}
setParticlesCount(count)
set the count for particles
windlayer.setParticlesCount(count);
getParticlesCount()
get the count of particles for windlayer
windlayer.getParticlesCount();
Returns Number
setRampColors(colors)
set the ramp color for rendering particles
windlayer.setRampColors(colors);
{
0.0: '#3288bd',
0.1: '#66c2a5',
0.2: '#abdda4',
0.3: '#e6f598',
0.4: '#fee08b',
0.5: '#fdae61',
0.6: '#f46d43',
1.0: '#d53e4f'
}
getWindSpeed(coordinate)
get the wind speed on specified location
windlayer.getWindSpeed(coordinate);
Returns Array
It is written in ES6, transpiled by babel and tested with mocha and expect.js.
$ npm install
$ npm run dev
$ npm run build
$ npm run test
FAQs
A maptalks Layer to render gltf
We found that maptalks.wind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.