multipolygons shouldn't have non-Way members
authorRichard Fairhurst <richard@systemed.net>
Fri, 24 Dec 2010 10:33:33 +0000 (10:33 +0000)
committerRichard Fairhurst <richard@systemed.net>
Fri, 24 Dec 2010 10:33:33 +0000 (10:33 +0000)
net/systemeD/halcyon/WayUI.as
net/systemeD/halcyon/connection/Relation.as

index 949a8578296aa76e092c898c5da0dda2279b28c3..a7a513fdf4bb9fc27a550ffb4fdc1f42bf2bd886 100644 (file)
@@ -264,7 +264,7 @@ package net.systemeD.halcyon {
                        var multis:Array=entity.findParentRelationsOfType('multipolygon','outer');
                        var inners:Array=[];
                        for each (var m:Relation in multis) {
-                               inners=inners.concat(m.findMembersByRole('inner'));
+                               inners=inners.concat(m.findMembersByRole('inner',Way));
                        }
 
                        for each (var sublayer:Number in styleList.sublayers) {
index ea8902ad1d5973928e9c2c94d4ed616d94602c4c..8ac31927f11b97ab1a6c9a8b0035c292a1fdbcc0 100644 (file)
@@ -60,10 +60,10 @@ package net.systemeD.halcyon.connection {
                        markDirty();
         }
 
-               public function findMembersByRole(role:String):Array {
+               public function findMembersByRole(role:String, entityType:Class=null):Array {
                        var a:Array=[];
             for (var index:uint = 0; index < members.length; index++) {
-                if (members[index].role==role) { a.push(members[index].entity); }
+                if (members[index].role==role && (!entityType || members[index].entity is entityType)) { a.push(members[index].entity); }
             }
                        return a;
                }