Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.97k stars 992 forks source link

Can draw crossed polygon with allowIntersection set to false #823

Open hbaltz opened 6 years ago

hbaltz commented 6 years ago

How to reproduce

What behaviour I'm expecting and which behaviour I'm seeing

Minimal example reproducing the issue

You can reproduce this in the demo

kirantpatil commented 5 years ago

We also want to detect one more scenario as below.

  1. Create a polygon p1.

  2. Try to create p2 polygon on top of p1

Expected output:

It should show pop like "You are creating polygon on top of existing polygon" to continue Press "Yes" or "No".

If we select "Yes" then it should allow us to draw overlapping polygon and if "No" then it should discard the last step of polygon so that he can still proceed to create polygon p2 without intercepting the p1.