Skip to content

deyihu/maptalks.flubber

Repository files navigation

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="https://unpkg.com/maptalks.flubber/dist/maptalks.flubber.js"></script>

API

polygon will auto mount transform method

import * as maptalks from 'maptalks';
import 'maptalks.flubber';

methods

  • polygon.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
});

Releases

No releases published

Packages

No packages published