Disabling draw by the plugin #1328
Unanswered
joshting
asked this question in
Questions & Help
Replies: 1 comment
-
You can disable the draw controls with
https://jsfiddle.net/758abqhy/ Importing GeoJSON and adding events:You can use the default Leaflet
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am sending the data to be persisted in the backend and only should draw the layer when I get the response back. Therefore, I want to disable drawing by the plugin itself and draw it myself with the GeoJson value from the pm:create and pm:change events.
How do I disable the drawing by the plugin? Or do I just delete it on those events?
Extending the question above. Is it possible to create the point/line/polygon with leaflet-geoman hooks/events? i.e. programmatically create them after reading from cache/database/backend? For example, I can get the GeoJson and using leaflet's L.geoJson(feature) to recreate it on map but it will no longer emit events like that draw using leaflet-geoman.
Beta Was this translation helpful? Give feedback.
All reactions