POIs, and relations, and stuff :)
[potlatch2.git] / net / systemeD / halcyon / connection / Way.as
index 56dad5f6f8066222c25aa42bf334b09c75a12b85..69c62ee92e2716547a439764c2450f186f2633a7 100644 (file)
@@ -4,12 +4,19 @@ package net.systemeD.halcyon.connection {
         private var nodes:Array;
                public static var entity_type:String = 'way';
 
-        public function Way(id:Number, version:uint, tags:Object, nodes:Array) {
-            super(id, version, tags);
+        public function Way(id:Number, version:uint, tags:Object, loaded:Boolean, nodes:Array) {
+            super(id, version, tags, loaded);
             this.nodes = nodes;
                        for each (var node:Node in nodes) { node.addParent(this); }
         }
 
+               public function update(version:uint, tags:Object, loaded:Boolean, nodes:Array):void {
+                       var node:Node;
+                       for each (node in this.nodes) { node.removeParent(this); }
+                       updateEntityProperties(version,tags,loaded); this.nodes=nodes;
+                       for each (node in nodes) { node.addParent(this); }
+               }
+
         public function get length():uint {
             return nodes.length;
         }