All Projects → tcoupin → leaflet-paintpolygon

tcoupin / leaflet-paintpolygon

Licence: GPL-3.0 license
Leaflet plugin to create polygon with circle as paint

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to leaflet-paintpolygon

Flutter Canvas
About using of canvas in the flutter
Stars: ✭ 259 (+581.58%)
Mutual labels:  paint, draw, polygon
Drawing
Drawing and fill color
Stars: ✭ 37 (-2.63%)
Mutual labels:  paint, draw
canvas-paint
🎨 helper functions for drawing onto <canvas> elements
Stars: ✭ 18 (-52.63%)
Mutual labels:  paint, draw
React Sketch
Sketch Tool for React-based applications, backed up by FabricJS
Stars: ✭ 414 (+989.47%)
Mutual labels:  paint, draw
Wicket
A modest library for moving between Well-Known Text (WKT) and various framework geometries
Stars: ✭ 484 (+1173.68%)
Mutual labels:  leaflet, polygon
Leaflet.draw.drag
Drag feature functionality for Leaflet.draw
Stars: ✭ 56 (+47.37%)
Mutual labels:  leaflet, draw
gridder
A Grid based 2D Graphics library
Stars: ✭ 51 (+34.21%)
Mutual labels:  paint, draw
Cirque
An iOS component that enables you to draw multi color circle strokes with gradient trasitions between colors
Stars: ✭ 23 (-39.47%)
Mutual labels:  draw, circle
Mopaint
🎨💪 Modern, modular paint and more! (pre-alpha, not much done yet)
Stars: ✭ 50 (+31.58%)
Mutual labels:  paint, draw
Touchable
Flutter library to add gestures and animations to each Shape you draw on your canvas in your CustomPainter
Stars: ✭ 82 (+115.79%)
Mutual labels:  paint, draw
Sketchpad
Sketchpad is fully customisable collaborative whiteboard plugin written in pure JavaScript.
Stars: ✭ 85 (+123.68%)
Mutual labels:  paint, draw
Maker.js
📐⚙ 2D vector line drawing and shape modeling for CNC and laser cutters.
Stars: ✭ 1,185 (+3018.42%)
Mutual labels:  draw, circle
Sharpmath
A small .NET math library.
Stars: ✭ 36 (-5.26%)
Mutual labels:  draw, polygon
Leaflet Geoman
🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+2763.16%)
Mutual labels:  leaflet, polygon
Leaflet.freedraw
🌏 FreeDraw allows the free-hand drawing of shapes on your Leaflet.js map layer – providing an intuitive and familiar UX for creating geospatial boundaries similar to Zoopla and others. Included out-of-the-box is the concaving of polygons, polygon merging and simplifying, as well as the ability to add edges and modify existing shapes.
Stars: ✭ 446 (+1073.68%)
Mutual labels:  draw, polygon
Sketch
Sketch have a lot of basic functions to develop a drawing app for iPhone. Anyone can easily create drawing iOS Application.
Stars: ✭ 229 (+502.63%)
Mutual labels:  paint, draw
react-native-tcharts
基于React Native ART的图表组件库
Stars: ✭ 25 (-34.21%)
Mutual labels:  polygon, circle
Kld Intersections
A library of intersection algorithms covering all SVG shape types
Stars: ✭ 214 (+463.16%)
Mutual labels:  polygon, circle
Doodle
Image doodle for Android, with functions such as undo, zoom, move, text, image, etc. Also a powerful, customizable and extensible doodle framework & multi-function drawing board. Android图片涂鸦,具有撤消,缩放,移动,添加文字,贴图等功能。还是一个功能强大,可自定义和可扩展的涂鸦框架、多功能画板。
Stars: ✭ 809 (+2028.95%)
Mutual labels:  paint, draw
Pixelorama
A free & open-source 2D sprite editor, made with the Godot Engine! Available on Windows, Linux, macOS and the Web!
Stars: ✭ 2,535 (+6571.05%)
Mutual labels:  paint, draw

leaflet-paintpolygon

Dependency Status npm npm Twitter

Create polygon on leaflet map like Paint[brush]! Choose your brush size and draw ! Or erase... Mobile and desktop compatible, based on turf.js.

Demo

Turf packages are already included in dist js.

Use it

L.control.paintPolygon().addTo(map)

Options

 options: {
        position: 'topright',     // position of the control
        radius: 30,               // radius on start (pixel)
        minRadius: 10,            // min radius (pixel)
        maxRadius: 50,            // max radius (pixel)
        layerOptions: {},         // path style of drawed layer (see: https://leafletjs.com/reference-1.3.0.html#path-option)
        drawOptions: {            // path style on draw (see: https://leafletjs.com/reference-1.3.0.html#path-option)
            weight: 1
        },
        eraseOptions: {           // path style on erase (see: https://leafletjs.com/reference-1.3.0.html#path-option)
            color: '#ff324a',
            weight: 1
        },
        menu: {                   // Customize menu, set to false to prevent adding control UI on map, you need to build your own UI (on map or not)
        	drawErase: true,
            size: true,
            eraseAll: true
        }
}               

External control

Add menu: false in options object to prevent UI creation and bind your own UI to controls methods. See below for API and this example.

API

  • setRadius(radius): set radius of circle (in pixel)
  • startDraw(): start drawing
  • startErase(): start erasing
  • stop(): stop drawing or erasing
  • eraseAll(): erase all...
  • getData(): return feature as GeoJSON
  • setData(data): set the feature as GeoJSON
  • getLayer(): return GeoJSON layer
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].