angular.module("leaflet-directive").directive('controls', function ($log, leafletHelpers, leafletControlHelpers) {
    return {
        restrict: "A",
        scope: false,
        replace: false,
        require: '?^leaflet',

        link: function(scope, element, attrs, controller) {
            if(!controller) {
                return;
            }

            var createControl = leafletControlHelpers.createControl;
            var isValidControlType = leafletControlHelpers.isValidControlType;
            var leafletScope  = controller.getLeafletScope();
            var isDefined = leafletHelpers.isDefined;
            var leafletControls = {};
            var errorHeader = leafletHelpers.errorHeader + ' [Controls] ';

            controller.getMap().then(function(map) {

                leafletScope.$watchCollection('controls', function(newControls) {

                    // Delete controls from the array
                    for (var name in leafletControls) {
                        if (!isDefined(newControls[name])) {
                            if (map.hasControl(leafletControls[name])) {
                                map.removeControl(leafletControls[name]);
                            }
                            delete leafletControls[name];
                        }
                    }

                    for (var newName in newControls) {
                        var control;

                        var controlType = isDefined(newControls[newName].type) ? newControls[newName].type : newName;

                        if (!isValidControlType(controlType)) {
                            $log.error(errorHeader + ' Invalid control type: ' + controlType + '.');
                            return;
                        }

                        if (controlType !== 'custom') {
                            control = createControl(controlType, newControls[newName]);
                        } else {
                            control = newControls[newName];
                        }
                        map.addControl(control);

                        leafletControls[newName] = control;
                    }

                });

            });
        }
    };
});

@@ -614,16 +614,66 @@
 efined;%0A
+            var isArray = leafletHelpers.isArray;%0A
         
@@ -1950,24 +1950,141 @@
 %5BnewName%5D);%0A
+                            map.addControl(control);%0A                            leafletControls%5BnewName%5D = control;%0A
             
@@ -2132,23 +2132,38 @@
         
-c
+var customC
 ontrol
+Value
  = newCo
@@ -2207,119 +2207,704 @@
     
-%7D%0A                        map.addControl(control);%0A%0A                        leafletControls%5BnewName%5D = control;
+    if (isArray(customControlValue)) %7B%0A                                for (var customControl in customControlValue) %7B%0A                                    var control = customControlValue%5BcustomControl%5D;%0A                                    map.addControl(control);%0A                                    leafletControls%5BnewName%5D = !isDefined(leafletControls%5BnewName%5D) ? %5Bcontrol%5D : leafletControls%5BnewName%5D.concat(%5Bcontrol%5D);%0A                                %7D%0A                            %7D else %7B%0A                                map.addControl(customControlValue);%0A                                leafletControls%5BnewName%5D = customControlValue;%0A                            %7D%0A                        %7D
 %0A   

enable array of custom controls