Support inline status, where the status field is part of e.g. map calls
authorAndy Allan <andy@gravitystorm.co.uk>
Wed, 15 Jun 2011 09:58:17 +0000 (10:58 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Wed, 15 Jun 2011 09:58:17 +0000 (10:58 +0100)
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/connection/XMLBaseConnection.as

index 4b2dbe410fe9f7f56bf2d6d22576a37ee8f2f072..a38dcfbd28a321e4c32772d4b516910fa2aa4d59 100644 (file)
@@ -13,6 +13,7 @@ package net.systemeD.halcyon.connection {
 
                public var name:String;
                public var statusFetcher:StatusFetcher;
+               public var inlineStatus:Boolean = false;
         protected var apiBaseURL:String;
         protected var policyURL:String;
         protected var params:Object;
index d2e5164ea0601f221f28d930abc4d8428af4e8dd..5c109f2478c75f2cac8fca86f07a901682534177 100644 (file)
@@ -102,6 +102,7 @@ package net.systemeD.halcyon.connection {
                                                   Number(nodeData.@lon),
                                                   Number(nodeData.@uid),
                                                   nodeData.@timestamp);
+                if ( inlineStatus ) { newNode.status = nodeData.@status; trace(newNode.status)}
                                
                                if ( singleEntityRequest ) {
                                        // it's a revert request, so create/update the node
@@ -137,6 +138,7 @@ package net.systemeD.halcyon.connection {
                     tags = parseTags(data.tag);
                     if ( way == null ) {
                         way=new Way(this, id, version, tags, true, nodelist, uid, timestamp)
+                        if ( inlineStatus ) { way.status = data.@status; trace(way.status); }
                         setWay(way,false);
                         createdEntities.push(way);
                     } else {
@@ -145,6 +147,8 @@ package net.systemeD.halcyon.connection {
                         sendEvent(new EntityEvent(NEW_WAY, way), false);
                     }
                 }
+
+
             }
             
             markBboxLoaded(minlon,maxlon,maxlat,minlat);