Allow knowledge of the style in use in MapPaint - similar to VectorBackground did...
authorAndy Allan <andy@gravitystorm.co.uk>
Tue, 24 May 2011 10:51:51 +0000 (11:51 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Tue, 24 May 2011 10:51:51 +0000 (11:51 +0100)
net/systemeD/halcyon/MapPaint.as

index b00149b89163fbcc3caaa2d7b7915dddbde0ed98..0dafd34d6e27647a43f0e86bb521e60775d0350e 100644 (file)
@@ -34,6 +34,9 @@ package net.systemeD.halcyon {
                /** Hash of index->position */
                public var sublayerIndex:Object={};
 
+        /** The url of the style in use */
+        public var style:String = '';
+
                private const VERYBIG:Number=Math.pow(2,16);
                private static const NO_LAYER:int=-99999;               // same as NodeUI
 
@@ -341,6 +344,7 @@ package net.systemeD.halcyon {
                
                /** Switch to new MapCSS. */
                public function setStyle(url:String):void {
+            style = url;
                        ruleset=new RuleSet(map.MINSCALE,map.MAXSCALE,redraw,redrawPOIs);
                        ruleset.loadFromCSS(url);
         }