Skip to content

Releases: geoman-io/leaflet-geoman

Stability

31 Oct 06:13
Compare
Choose a tag to compare

Breaking Changes

  • pm:cut event now returns one resultingLayer as layer which is a MultiPolygon, not an array of layers inside resultingLayer: bf16348
  • pm:cut event layer and original layer properties keys change: 923bec8

Major Changes

  • Add Cypress Testing Suite, Fixes #210: #307
    Seriously, this is a big deal. After years of releasing with fear - we can now build and release with some confidence thanks to the awesome work of the cypress team.

Minor Changes

  • Add a snapdrag event for getting snap point: #343
  • You can now snap to middle of segments: #314
  • The Hintline style properly resets now. Fixes #333: #340

Patches

  • GeoJSON precision changed to 15 digits after decimal: #306
  • Fixed Draw Circle for mobile. Closes #263: 808eeb6
  • Circle options are now properly handled after draw: #313
  • Add new vertices at correct index: #319
  • Updated turf: 700699c
  • Fix a bug where FeatureCollection with Circles weren't editable: #348
  • Fixed dependency vulnerabilities: ffd23ad
  • Fixed a bug where circles within featureGroups can't be edited multiple times: 4f47e78
  • Single-Coord Line/Polys now can't be finished during draw: #349
  • Changed "MultiPolyline" to "MultiLineStrings": b5d5af6
  • Fixed draw rectangle for mobile: ca8d967

Demo

Check out the new capabilities on Geoman

Credits

Huge thanks to @mohammedzamakhan, @KenAlin, and @gorunovanton for helping!

Small Versioning Note

2 years ago I (probably accidentally) released a 1.0.0 version on npm. I can't override it so I had to publish as 1.0.1 :-)

MultiPolygons & MultiLineString

19 Jun 16:54
Compare
Choose a tag to compare

Minor Changes

  • Added Multipolygon and MultiLineString Support 💪: #305
  • Reduced filesize from 800kb to 90kb thanks to Turf 6.x 🎉: #300

Patches

  • Circles are not support with Canvas #297: #301
  • Properly reset mouse cursor, fixes #299: #302
  • Handled nested LayerGroups; Fixes #262; Fixes #295: 763b572
  • Only include resulting layers for the current cutted layer: #259

Credits

Huge thanks to @mpschaeuble, @smeijer, @cagritepebasili, @DenisCarriere and @jpknapp for helping!

Minor Patches

15 May 08:09
Compare
Choose a tag to compare

Patches

  • Marker class now properly stores options. Fixes #292: e9ce8f9
  • GlobalRemovalMode now respects preventMarkerRemoval options: 2f92699
  • Updated turf intersect: 06f37e1

Options and Fixes for everyone

14 Mar 08:49
Compare
Choose a tag to compare

Minor Changes

  • Add option to disable marker removal during edit. Fixes #258: 9e0ea8d
  • Added option to prevent vertex editing in edit mode. Fixes #274: dde74dc
  • Support preferCanvas: #286

Patches

  • Added missing step, closes #283: 7bbe899
  • Pm:edit on circles fires after edit, not during. Fixes #285: d0446df
  • Hintline style is properly reset after showing error style, fixes #275: 8d48753
  • Dont start drag on right click, fixes #260: 20e1a6a
  • Redundant coordinate when finish polygon with double click: #281

Credits

Huge thanks to @cosme-benito, @mpschaeuble and @chriswilley for helping!

Fix failing webpack builds

04 Jan 11:17
Compare
Choose a tag to compare

Patches

More events, More fun

01 Dec 18:09
Compare
Choose a tag to compare

Minor Changes

  • Added fire, markerdragend and markerdragstart pm events to rectangle. Fixes #245: 71a8e55
  • Added global edit mode toggled event. Fixes #246: eddeef6
  • Added pm:update event. Fixes #229: 47336a3
  • Added pm:centerplaced event, fired when the center of a Circle is placed or moved. Fixes #251: 9907970

Patches

  • Fix rectangle drawing color bug: #253
  • Set default _globalRemovalMode to false as promised in #247: 5e1fd7a
  • Rectangle helpers are hidden when not needed. Fixes #252: 7eac1ea
  • Updated dependencies: #255

Credits

Huge thanks to @Mesonyx and @themre for helping!

Self-Intersections

14 Oct 07:41
Compare
Choose a tag to compare

Minor Changes

  • ADDED: allowSelfIntersection option: #241
  • ADDED: you can now pass your options to globalEditMode (enable & disable it)
  • ADDED: pass options to newly created layers’ edit mode so they are preserved for global edit mode
  • Made cut button snappable by default: 933e076

Patches

  • FIXED: Fix 🐛 for switching drawing modes, fixes #242 and other problems: #240
  • FIXED: manual change of globalEditMode now correctly toggles the Toolbar button
  • FIXED: resulting layers of a cutted layer now properly inherit options
  • Create CODE_OF_CONDUCT.md: 952df79
  • Create CONTRIBUTING.md: 916feb2
  • Create LICENSE: 40862b9
  • Remove license in favor of LICENCE.MD: c778529

Finish Drawing on your Terms

05 Oct 08:48
Compare
Choose a tag to compare

Minor Changes

  • Added finishOn option to pass events on which to finish drawing: #233
map.pm.enableDraw('Poly', { finishOn: 'dblclick' });

finishon event2

  • Added possibility to pass options to the toolbar drawing buttons too. Fixes #117
// make markers not snappable during marker draw
map.pm.enableDraw('Marker', { snappable: false });
map.pm.disableDraw('Marker');

// let polygons finish their shape on double click
map.pm.enableDraw('Poly', { finishOn: 'dblclick' });
map.pm.disableDraw('Poly');

Patches

  • CenterMarker is not draggable anymore during Circle Draw. Fixes #230:
    fa82ff0

Credits

Huge thanks to @themre for his PR which was the base for #233

Events and Fixes

26 Sep 16:00
Compare
Choose a tag to compare

Minor Changes

  • Added Vertex Events (MINOR): #227
    With this you could - for example - listen when new vertexes are added during drawing of a polygon:
// listen to vertexes being added to the workingLayer
map.on('pm:drawstart', function(e) {
    var layer = e.workingLayer;
    layer.on('pm:vertexadded', function(e) {
        // e includes the new vertex, it's marker
        // the index in the coordinates array
        // the working layer and shape
    });
});

Patches

  • Make HintMarker more visible: #220
  • Add Polyfill for findIndex: 5bce48c
  • Added marker index information to markerdrag events: #225: ca68845
  • Removed sourcemaps from prod build. Fixes #222: e1f4379
  • Add workingLayer to pm:drawstart: #221
  • Fix error when removing a layer during snappable drawing;: 8ba9844

Credits

Huge thanks to @newmanw and @richorama for their help!

Rectangle Support

10 Sep 08:59
Compare
Choose a tag to compare

Minor Changes

  • ADDED: pm:cut event: #211
  • ADDED: Rectangle Support for Drawing and Editing: #196

Patches

  • FIXED: Vertex Removal removes layer or hole: #209
  • IMPROVED: Rearranged Toolbar and renamed some buttons: #212
  • FIXED: marker edit respects draggable option now (Fixes #213): f9e1f67
  • Added cutPolygon button to toolbar options: 9d7da1e

Credits

Huge thanks to @Mesonyx for the Rectangle PR!