Let's just have one type of VectorLayer
authorRichard Fairhurst <richard@systemed.net>
Fri, 9 Jul 2010 07:27:52 +0000 (07:27 +0000)
committerRichard Fairhurst <richard@systemed.net>
Fri, 9 Jul 2010 07:27:52 +0000 (07:27 +0000)
net/systemeD/halcyon/vectorlayers/CustomVectorLayer.as [deleted file]
net/systemeD/halcyon/vectorlayers/SimpleVectorLayer.as [deleted file]
net/systemeD/halcyon/vectorlayers/VectorLayer.as

diff --git a/net/systemeD/halcyon/vectorlayers/CustomVectorLayer.as b/net/systemeD/halcyon/vectorlayers/CustomVectorLayer.as
deleted file mode 100644 (file)
index d2b5a5e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.systemeD.halcyon.vectorlayers {
-
-       import net.systemeD.halcyon.Map;
-       import net.systemeD.halcyon.NodeUI;
-       import net.systemeD.halcyon.WayUI;
-       import net.systemeD.halcyon.connection.Way;
-       import net.systemeD.halcyon.connection.Node;
-       import net.systemeD.halcyon.connection.Entity;
-       import net.systemeD.halcyon.styleparser.*;
-
-       // A CustomVectorLayer can be fully styled with Halcyon rules.
-
-       public class CustomVectorLayer extends VectorLayer {
-
-               public function CustomVectorLayer(name:String,map:Map,style:String) {
-                       super(name,map);
-                       this.style=style;
-                       redrawFromCSS(style);
-               }
-               
-               public function redrawFromCSS(style:String):void {
-                       paint.ruleset=new RuleSet(map.MINSCALE,map.MAXSCALE,paint.redraw);
-                       paint.ruleset.loadFromCSS(style);
-               }
-       }
-}
diff --git a/net/systemeD/halcyon/vectorlayers/SimpleVectorLayer.as b/net/systemeD/halcyon/vectorlayers/SimpleVectorLayer.as
deleted file mode 100644 (file)
index 07ffa97..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-package net.systemeD.halcyon.vectorlayers {
-
-       // A SimpleVectorLayer has a simpler, lines-only appearance - suitable for
-       // large quantities of data such as GPX traces.
-
-       public class SimpleVectorLayer extends VectorLayer {
-               // todo
-       }
-}
index 0c1c70a..788dbb7 100644 (file)
@@ -4,6 +4,7 @@ package net.systemeD.halcyon.vectorlayers {
        import net.systemeD.halcyon.MapPaint;
        import net.systemeD.halcyon.connection.*;
        import net.systemeD.halcyon.Globals;
+       import net.systemeD.halcyon.styleparser.RuleSet;
 
        public class VectorLayer extends Object {
 
@@ -18,10 +19,17 @@ package net.systemeD.halcyon.vectorlayers {
                public var relations:Object=new Object();               //  |
         private var negativeID:Number = -1;
 
-               public function VectorLayer(n:String,m:Map) {
+               public function VectorLayer(n:String,m:Map,s:String) {
                        name=n;
                        map=m;
+                       style=s;
                        paint=new MapPaint(m,0,0);
+                       redrawFromCSS(style);
+               }
+
+               public function redrawFromCSS(style:String):void {
+                       paint.ruleset=new RuleSet(map.MINSCALE,map.MAXSCALE,paint.redraw);
+                       paint.ruleset.loadFromCSS(style);
                }
                
                public function createNode(tags:Object,lat:Number,lon:Number):Node {