First cut at styling TIGER data via an option. Needs lots of propagation of uid and...
[potlatch2.git] / net / systemeD / halcyon / Elastic.as
index 134ea6dd76c75c5d94c5612cf932eedaf15c2a07..2cd8ad981bb2ba8f765931e127195ebcb7982af1 100755 (executable)
@@ -61,32 +61,20 @@ package net.systemeD.halcyon {
                        // Create stroke object
                        var stroke:Shape = new Shape();
             stroke.graphics.lineStyle(1, 0xff0000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
                        // Create stroke object
                        var stroke:Shape = new Shape();
             stroke.graphics.lineStyle(1, 0xff0000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
-                       addToLayer(stroke,3);
+
+                       var l:DisplayObject=map.paint.getPaintSpriteAt(map.paint.maxlayer);
+                       var o:DisplayObject=Sprite(l).getChildAt(3);    // names layer
+                       (o as Sprite).addChild(stroke);
+                       sprites.push(stroke);
+
                        dashedLine(stroke.graphics, [2,2]);
                        dashedLine(stroke.graphics, [2,2]);
-                       
-                       var nodes:Sprite = new Sprite();
-            drawNodes(nodes.graphics);
-            addToLayer(nodes, 3);
+
 
                }
                
                // ------------------------------------------------------------------------------------------
                // Drawing support functions
 
 
                }
                
                // ------------------------------------------------------------------------------------------
                // Drawing support functions
 
-               private function drawNodes(g:Graphics):void {
-            g.lineStyle(1, 0xff0000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
-                       for (var i:uint = 0; i < 1; i++) {
-                var p:Point = i == 0 ? start : end;
-                var x:Number = map.lon2coord(p.x);
-                var y:Number = map.latp2coord(p.y);
-                g.moveTo(x-2, y-2);
-                g.lineTo(x+2, y-2);
-                g.lineTo(x+2, y+2);
-                g.lineTo(x-2, y+2);
-                g.lineTo(x-2, y-2);
-                       }
-               }
-
                // Draw dashed polyline
                
                private function dashedLine(g:Graphics,dashes:Array):void {
                // Draw dashed polyline
                
                private function dashedLine(g:Graphics,dashes:Array):void {
@@ -135,19 +123,5 @@ package net.systemeD.halcyon {
                                 else { g.moveTo(x,y); }
                }
 
                                 else { g.moveTo(x,y); }
                }
 
-               
-               // Add object (stroke/fill/roadname) to layer sprite
-               
-               private function addToLayer(s:DisplayObject,t:uint,sublayer:int=-1):void {
-                       var l:DisplayObject=Map(map).getChildAt(map.WAYSPRITE+5);
-                       var o:DisplayObject=Sprite(l).getChildAt(t);
-                       if (sublayer!=-1) { o=Sprite(o).getChildAt(sublayer); }
-                       Sprite(o).addChild(s);
-                       sprites.push(s);
-            if ( s is Sprite ) {
-                Sprite(s).mouseEnabled = false;
-                Sprite(s).mouseChildren = false;
-            }
-               }
        }
 }
        }
 }