Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage example in documentation has syntax error #1029

Open
justinjngan opened this issue Oct 23, 2021 · 0 comments
Open

Usage example in documentation has syntax error #1029

justinjngan opened this issue Oct 23, 2021 · 0 comments

Comments

@justinjngan
Copy link

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:

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 ';'

Using jsfiddle or another example site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant