Dynamically remove controls with setDrawingOptions
See original GitHub issueHi,
I’m changing the options set to drawControl
dynamically and I noticed that passing polyline: false
for instance, won’t remove/hide the polyline control.
If it’s normal, it should be in the doc imo.
Thanks.
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Developers - Dynamically remove controls with setDrawingOptions -
Hi,. I'm changing the options set to drawControl dynamically and I noticed that passing polyline: false for instance, won't remove/hide the polyline control...
Read more >setDrawingOptions after baselayer change Leaflet Draw
I suppose that drawControl is created like: var drawControl = new L.Control.Draw();. If yes, then it is not a property of the map...
Read more >Leaflet Draw Documentation
The following disables drawing polygons and markers. It also turns off the ability to edit layers. var drawControl = new L.Control.Draw({ draw: {...
Read more >[Solved] Removing dynamic controls - CodeProject
I think it's time to introduce you to a new idea. Why not treat your three controls as a single control? There is...
Read more >leaflet-draw | Yarn - Package Manager
... by using the setDrawingOptions method on the Leaflet.draw control. ... #95; Fixed issue where removing the draw control from the map would...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just noticed: if after
i do:
and:
Changes take effect.
Here is what I’ve done to allow the user to only create one shape.
Custom it as you want.