position POI labels properly
authorRichard Fairhurst <richard@systemed.net>
Mon, 14 Jun 2010 22:57:06 +0000 (22:57 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 14 Jun 2010 22:57:06 +0000 (22:57 +0000)
TODO.txt
net/systemeD/halcyon/NodeUI.as
net/systemeD/halcyon/styleparser/TextStyle.as

index b7d598d..ced24e3 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -61,7 +61,6 @@ Potlatch 2: main outstanding issues
 == Rendering (Halcyon) ==
 
 ** Infinite z-indexes
-* Point labels are now centred wrongly!
 * { interactive: no; } - stop items being clicked on (and their maxwidth being taken into account)
 * Shields
 * More line decoration (cliffs etc.), and implied values for 'dashes' if not supplied
index fc0cb99..6a7bf87 100644 (file)
@@ -104,7 +104,7 @@ package net.systemeD.halcyon {
                                }
 
                                // name sprite
-                               var a:String, t:TextStyle;
+                               var a:String='', t:TextStyle;
                                if (sl.textStyles[sublayer]) {
                                        t=sl.textStyles[sublayer];
                                        a=tags[t.text];
@@ -113,7 +113,7 @@ package net.systemeD.halcyon {
                                if (a) { 
                                        var name:Sprite=new Sprite();
                                        addToLayer(name,NAMESPRITE);
-                                       t.writeNameLabel(name,a,paint.map.lon2coord(node.lon),paint.map.latp2coord(node.latp));
+                                       t.writeNameLabel(name,a,0,0);
                                }
                        }
                        return r;
index fc83693..5a01349 100644 (file)
@@ -70,8 +70,8 @@ package net.systemeD.halcyon.styleparser {
                                tf.height = tf.textHeight+4;
                        }
                        if (text_halo_radius>0) { tf.filters=getHaloFilter(); }
-                       d.x=x; tf.x=-tf.width/2;
-                       d.y=y; tf.y=(text_offset ? text_offset : 0)-tf.height/2;
+                       d.x=x-tf.width/2;
+                       d.y=y-tf.height/2; tf.y=text_offset ? text_offset : 0;
                        d.addChild(tf);
 
                        return tf;