show junction nodes in a Potlatch 1 style. Ridiculously easy :)
authorRichard Fairhurst <richard@systemed.net>
Mon, 11 Jan 2010 09:03:55 +0000 (09:03 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 11 Jan 2010 09:03:55 +0000 (09:03 +0000)
net/systemeD/halcyon/WayUI.as
net/systemeD/halcyon/connection/Entity.as
resources/potlatch.css

index db22e5860b962b35ce7425dbb7f8700d1d1accf6..0b1a27aae8fb893b8fa0bc2d6c3485a1d1a119ce 100755 (executable)
@@ -207,6 +207,7 @@ package net.systemeD.halcyon {
                                if (stateClasses["showNodes"]) { nodetags[':selectedway']='yes'; }
                                if (stateClasses["showNodesHover"]) { nodetags[':hoverway']='yes'; }
                                if (node.id==nodeSelected) { nodetags[':selected']='yes'; }
+                               if (node.numParentWays>1) { nodetags[':junction']='yes'; }
                                sl=map.ruleset.getStyles(node,nodetags);
                                if (sl.hasStyles()) {
                                        if (!map.pois[node.id]) {
index 78742f558b601a2dc0f4f8b69e912108d6528cab..66f0ff0167a3ebe8902b77d4c06bc5b7310bf765 100644 (file)
@@ -161,6 +161,14 @@ package net.systemeD.halcyon.connection {
                        return false;
                }
                
+               public function get numParentWays():uint {
+                       var i:uint=0;
+                       for (var o:Object in parents) {
+                               if (o is Way) { i++; }
+                       }
+                       return i;
+               }
+               
                public function get parentRelations():Array {
                        var a:Array=[];
                        for (var o:Object in parents) {
index 14e734c056831f312dff96694d4ae4f81a855a1c..52703086e91c66ec77652c1b0bab25138dbba495 100644 (file)
@@ -117,11 +117,12 @@ way :hover        { z-index: 2; width: eval('_width+10'); color: #ffff99; }
 way :selected { z-index: 2; width: eval('_width+10'); color: yellow; opacity: 0.7;}
 way !:drawn { z-index:10; width: 0.5; color: gray; } 
 
-node :selectedway { z-index: 9; icon-image: square; icon-width: 7; color: red; }
+node :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: red; }
 node :hoverway { z-index: 9; icon-image: square; icon-width: 7; color: blue; }
 node !:drawn :poi { z-index: 2; icon-image: circle; icon-width: 4; color: green; casing-color: black; casing-width: 1; }
 node :selected { z-index: 1; icon-image: square; icon-width: eval('_width+10'); color: yellow; }
-
+node :junction :selectedway { z-index: 8; icon-image: square; icon-width: 12; casing-color: black; casing-width: 1; }
+       
 /* Descendant selectors provide an easy way to style relations: this example means "any way
    which is part of a relation whose type=route". */