code: function mapOverlayDirective(directiveName, events) {
      app.directive(directiveName, [function () {
        return {
          restrict: 'A',
          link: function (scope, elm, attrs) {
            scope.$watch(attrs[directiveName], function (newObject) {
              bindMapEvents(scope, events, newObject, elm);
            });
          }
        };
      }]);
    }
docs: /*
  Map overlay directives all work the same. Take map marker for example
  <ui-map-marker="myMarker"> will $watch 'myMarker' and each time it changes,
  it will hook up myMarker's events to the directive dom element.  Then
  ui-event will be able to catch all of myMarker's events. Super simple.