From: Richard Fairhurst Date: Mon, 11 Jan 2010 09:03:55 +0000 (+0000) Subject: show junction nodes in a Potlatch 1 style. Ridiculously easy :) X-Git-Tag: 0.5~538 X-Git-Url: https://git.openstreetmap.org/potlatch2.git/commitdiff_plain/477f3af767cf128b7a0740aa70900a3b67202f56 show junction nodes in a Potlatch 1 style. Ridiculously easy :) --- diff --git a/net/systemeD/halcyon/WayUI.as b/net/systemeD/halcyon/WayUI.as index db22e586..0b1a27aa 100755 --- a/net/systemeD/halcyon/WayUI.as +++ b/net/systemeD/halcyon/WayUI.as @@ -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]) { diff --git a/net/systemeD/halcyon/connection/Entity.as b/net/systemeD/halcyon/connection/Entity.as index 78742f55..66f0ff01 100644 --- a/net/systemeD/halcyon/connection/Entity.as +++ b/net/systemeD/halcyon/connection/Entity.as @@ -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) { diff --git a/resources/potlatch.css b/resources/potlatch.css index 14e734c0..52703086 100644 --- a/resources/potlatch.css +++ b/resources/potlatch.css @@ -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". */