Merge branch 'refactor' into snapshotserver
authorAndy Allan <andy@gravitystorm.co.uk>
Wed, 15 Jun 2011 14:47:45 +0000 (15:47 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Wed, 15 Jun 2011 14:47:45 +0000 (15:47 +0100)
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/connection/XMLBaseConnection.as
net/systemeD/potlatch2/utils/SnapshotConnection.as
net/systemeD/potlatch2/utils/SnapshotLoader.as
resources/stylesheets/snapshot.css [new file with mode: 0644]

index 4b2dbe4..a38dcfb 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 d2e5164..5c109f2 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);
index 4910cf5..6709b27 100644 (file)
@@ -8,6 +8,7 @@ package net.systemeD.potlatch2.utils {
 
         public function SnapshotConnection(cname:String,api:String,policy:String,initparams:Object=null) {
             super(cname,api,policy,initparams);
+            inlineStatus = true;
         }
 
         /** Send a "complete" call to the server, and remove it from the current layer */
index b0feaed..4a4e478 100644 (file)
@@ -8,7 +8,7 @@ package net.systemeD.potlatch2.utils {
 
         private var map:Map;
         private var _layer:MapPaint;
-        private static const STYLESHEET:String="stylesheets/wireframe.css"; //TODO take from xml
+        private static const STYLESHEET:String="stylesheets/snapshot.css"; //TODO take from xml
         private var connection:SnapshotConnection;
 
 
diff --git a/resources/stylesheets/snapshot.css b/resources/stylesheets/snapshot.css
new file mode 100644 (file)
index 0000000..5bcebf1
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+
+       Stylesheet that does simple wireframe display
+
+*/
+
+way :hover     { z-index: 2; width: 1; color: blue; }
+way :selected { z-index: 2; width: 1; color: red; }
+way !:drawn { z-index:10; width: 1; color: black; }
+
+node :selectedway { z-index: 8; icon-image: square; icon-width: 6; color: green; }
+node :hoverway { z-index: 9; icon-image: square; icon-width: 6; color: blue; }
+node :selected { z-index: 9; icon-image: square; icon-width: 6; color: red; casing-color: black; casing-width: 1; }
+node !:drawn :poi { z-index: 2; icon-image: square; icon-width: 4; color: green; casing-color: black; casing-width: 1; }
+node !:drawn :hasTags { z-index: 9; icon-image: circle; icon-width: 3; color: black; }
+node :hasTags :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: black; layer: 5; }
+
+way[_status=incomplete]::statushighlight { z-index: 0; width: 20; color: red; }
+way[_status=complete]::statushighlight { z-index: 0; width: 20; color: green; opacity: 0.4; }
+node[_status=incomplete]::statushighlight { z-index: 0; icon-image: square; icon-width: 15; color: red; }
+node[_status=complete]::statushighlight { z-index: 0; icon-image: square; icon-width: 15; color: green; opacity: 0.4; }
+
+
+