@aquilinedrones/mapbox-gl-draw-ellipse
v1.0.2
Published
A custom mode for MapboxGL Draw to draw ellipse
Downloads
18
Readme
Mapbox GL Draw Ellipse
A custom mode is a supplement to the official plug-in mapbox-gl-draw.js, which implements the ability to draw ellipses
Installation
yarn add mapbox-gl-draw-ellipse
Usage
import DrawEllipse from "mapbox-gl-draw-ellipse";
const modes = MapboxDraw.modes;
modes.draw_ellipse = DrawEllipse;
const draw = new MapboxDraw({ modes });
draw.changeMode("draw_ellipse", { eccentricity: 0.8, divisions: 60 });
Build
yarn build
will do it.
License
MIT