diff --git a/src/draw/DrawToolbar.js b/src/draw/DrawToolbar.js index 63cb4abd8..7c3259d68 100644 --- a/src/draw/DrawToolbar.js +++ b/src/draw/DrawToolbar.js @@ -1 +1,16 @@ -L.DrawToolbar = {}; \ No newline at end of file +L.DrawToolbar = {}; + +/* + * Defaults added to map for convenience. + */ +L.Map.mergeOptions({ + drawControlTooltips: true, + drawControl: false +}); + +L.Map.addInitHook(function () { + if (this.options.drawControl) { + this.drawControl = new L.DrawToolbar.Control(); + this.addLayer(this.drawControl); + } +});