maptalks.flubber
v0.1.0
Published
transform [maptalksjs](https://github.com/maptalks/maptalks.js) polygon by [flubber](https://github.com/veltman/flubber)
Downloads
7
Readme
maptalks.flubber
transform maptalksjs polygon by flubber
Install
NPM
npm i maptalks.flubber
# or
yarn add maptalks.flubber
CDN
<script type="text/javascript" src="https://unpkg.com/maptalks/dist/maptalks.min.js"></script>
<script type="text/javascript" src="../dist/maptalks.flubber.js"></script>
API
polygon will auto mount transform
method
import * as maptalks from 'maptalks';
import 'maptalks.flubber';
Polygon.prototype.transform(polygon/coordinates/geojson, options, step) It is similar to animate
const polygon1 = new Polygon();
const polygon2 = new Polygon();
//transfrom polygon shape to polygon2 shape
polygon1.transform(polygon2, {
duration: 2000
}, function(frame) {
//do somethings
});