tombatossals/angular-leaflet-directive — pull request #549 by rvdkooy (2014-11-24 15:28:13+00:00)
Title: fixed the controls directive to correctly use its options

Issue #349 was closed stating that it was solved, but is was solved by doing:

```
angular.extend(options, controls.draw);
```
https://github.com/tombatossals/angular-leaflet-directive/blob/master/src/directives/controls.js#L25
But now you have to do this in your controller to make it work:
```
$scope.controls= {
draw: {
draw: {
polygon : false,
}
}
};

```
This is because the options object is being flattened out and passed to leaflet.draw which expects an object with a draw property on it (which is not on it, because it is flattened out).

With the current fix, the edit and position options will also be passed to leaflet.draw. See (https://github.com/Leaflet/Leaflet.draw/blob/master/src/Control.Draw.js#L3-L7) for the API

I also think that Issue: #523 is related to this problem.