maptalks.windylayer
An experiment layer plugin to draw animation of wind, this is a fork of Esri's wind-js. Most of the codes is ported from original great works.
Examples
Install
- Install with npm:
npm install maptalks.windylayer
. - Download from dist directory.
- Use unpkg CDN:
https://unpkg.com/maptalks.windylayer/dist/maptalks.windylayer.min.js
Usage
As a plugin, maptalks.windylayer
must be loaded after maptalks.js
in browsers.
Supported Browsers
IE 9-11, Chrome, Firefox, other modern and mobile browsers.
API Reference
WindyLayer
is a subclass of maptalks.Layer and inherits all the methods of its parent.
Constructor
id data options
- id String layer id
- data Marker[] layer data, an array of maptalks.Marker
- options Object options
- options defined in maptalks.Layer
getData
get layer's data
Returns Object
setData(data)
set new data
- data Object data to set
Returns this
toJSON()
export the layer's JSON.
var json = windyLayer;
Returns Object
Contributing
We welcome any kind of contributions including issue reportings, pull requests, documentation corrections, feature requests and any other helps.
Develop
The only source file is index.js
.
It is written in ES6, transpiled by babel and tested with mocha and expect.js.
Scripts
- Install dependencies
$ npm install
- Watch source changes and generate runnable bundle repeatedly
$ gulp watch
- Tests
$ npm test
- Watch source changes and run tests repeatedly
$ gulp tdd
- Package and generate minified bundles to dist directory
$ gulp minify
- Lint
$ npm run lint