]> git.openstreetmap.org Git - potlatch2.git/blobdiff - net/systemeD/potlatch2/mapfeatures/editors/RelationMemberEditor.as
forward & backward in route roles
[potlatch2.git] / net / systemeD / potlatch2 / mapfeatures / editors / RelationMemberEditor.as
index b8fd1744b6a11ae40a8d00c7c1b4b9fbc8c91773..8d371fb924447099d1b52dd2f0bbc35b07dafabe 100644 (file)
@@ -34,8 +34,17 @@ package net.systemeD.potlatch2.mapfeatures.editors {
                   if ( relVal != relationTags[k] )
                       addable = false;
               }
-              if (addable)
-                  matched.push(relation);
+              if (addable) {
+                  for each( var memberIndex:int in relation.findEntityMemberIndexes(_entity)) {
+                      var props:Object = {};
+                      props["relation"] = relation;
+                      props["id"] = relation.id;
+                      props["index"] = memberIndex;
+                      props["role"] = relation.getMember(memberIndex).role;
+                      props["entity"] = _entity;
+                      matched.push(props);
+                  }
+              }
           }
           return matched;
       }