Issue 624: support for drawing manager

added simple drawing manager directive, with support passing an options object directly to the google API, $watch()ing that options object to call the API on changes, disabling the $watch() for performance, and a control object to get direct access to the API DrawingManager instance.

Documentation has not yet been added to the website branch, but I'll work on that next.

@nmccready 
I can add these things later. A lot can be copied from free draw I think.

=====================
*Nicholas McCready*

Personal Email: nmccready@gmail.com
Web site: http://codemonkeyseedo.blogspot.com/
Twitter: nmccready <https://twitter.com/#!/nmccready>

On Wed, Oct 8, 2014 at 1:43 PM, Joe Ibershoff <notifications@github.com>
wrote:

> In
> src/coffee/directives/api/models/parent/drawing-manager-parent-model.coffee:
>
> > @@ -0,0 +1,23 @@
> > +angular.module("google-maps.directives.api.models.parent".ns())
> > +.factory "DrawingManagerParentModel".ns(),
> > +    ['Logger'.ns(), '$timeout'
> > +      ($log, $timeout) ->
> > +        class DrawingManagerParentModel
> > +          constructor: (@scope, element, @attrs, @map) ->
> > +            drawingManager = new google.maps.drawing.DrawingManager @scope.options
> > +            drawingManager.setMap @map
> > +
> > +            if @scope.control?
>
> It is certainly possible to add something like what you are describing --
> a list of overlays drawn by the DM could be maintained in the control,
> though that would necessitate adding listeners to every overlay drawn by
> the DM in order to update the list if the item is removed from the map
> manually. And the list would need to be $watch()ed in order to handle the
> reverse (so we can call setMap(null) on any overlays that are removed from
> the list), which would lead to an attribute to disable watching the list
> for performance.
>
> The events attribute could be added too, though it would need to work a
> little differently from how it works for individual overlay directives
> because this would need to incorporate events and handlers for each of the
> overlay types as well as the drawingManager events.
>
> Seems worthwhile to have those things, shouldn't be too tough to do, I'll
> add to this (and the documentation PR).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/angular-ui/angular-google-maps/pull/739/files#r18599110>
> .
>