You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
map.on(L.Draw.Event.CREATED;` function (e) {
var type = e.layerType,
layer = e.layer;
if (type === 'marker') {
// Do marker specific actions
}
// Do whatever else you need to. (save to db; add to map etc)
map.addLayer(layer);
});
The error is that the parameter L.Draw.Event.CREATED should end with a comma ',' not a semi-colon ';'
How to reproduce
Copy example from https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html under the L.Draw.Event section.
The page shows the sample code:
The error is that the parameter L.Draw.Event.CREATED should end with a comma ',' not a semi-colon ';'
Using jsfiddle or another example site.
The text was updated successfully, but these errors were encountered: