Removed executable flag from files which don't need it.
[potlatch2.git] / net / systemeD / potlatch2 / mapfeatures / Category.as
index 38fa3523aa4f1791a32aad8117e6fa9b4701a31b..956af130a9873a38df5db08bf93ee66e3eaf954f 100644 (file)
@@ -40,6 +40,20 @@ package net.systemeD.potlatch2.mapfeatures {
         public function get features():Array {
             return _features;
         }
+        
+        [Bindable(event="featuresChanged")]
+        public function getFeaturesForType(type:String):Array {
+            if ( type == null || type == "" )
+                return []; //_features;
+                
+            var filteredFeatures:Array = new Array();
+            for each( var feature:Feature in _features ) {
+                if ( feature.isType(type) )
+                    filteredFeatures.push(feature);
+            }
+            return filteredFeatures;
+        }
+        
     }
 }