Created
March 18, 2013 06:04
-
-
Save jmkelly/5185327 to your computer and use it in GitHub Desktop.
Alternative syntax for creating toolbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead of | |
var drawControl = new L.Control.Draw({ | |
edit: { | |
featureGroup: drawnItems | |
} | |
}); | |
How about | |
var editTools = new L.Control.Draw.EditToolbar(); | |
var drawTools = new L.Control.Draw.DrawToolbar(); | |
var customTools = new L.Control.Draw.MyOwnCustomToolbar(); | |
var drawControl = new L.Control.Draw({ | |
"edit": editTools, | |
"draw": drawTool, | |
"custom": customTools | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment