[OpenLayers-Users] Use single OL file with rotated labels in IE8

leene leene_85 at yahoo.de
Thu Jan 5 04:12:10 EST 2012


Hello list,
I use Openlayers 2.11 and applied a modification to rotate labels (from http://osgeo-org.1803224.n2.nabble.com/How-to-rotate-a-label-in-IE-td4834932.html).
Everything works fine (multifile in chrome, firefox, IE8; single file in chrome, firefox), but if I use the Openlayers.js single file in IE8 no labels are displayed. There is no error message. While debugging I detected one difference:
With multi file the label object is created after 

            this.textRoot.appendChild(label);
            label.appendChild(textbox);   
            label.appendChild(path);
So label has fields like 'stroke' and 'coordorigin'. E.g. 'coordorigin' has the attributes 'x' and 'y'.

With single file these label fields are not created. Later on the 'coordorigin' will be set. But instead of label.coordorigin.x=100; labelcoordorigin.y=200; there is only an entry label.coordorigin="100 200"; - so if I call label.coordorigin.y I get 'undefined'.


I think this could be the reason for the missing label. But why is the label object not created correctly?


I found out that there was a similar problem with labels and single file in IE8 (http://trac.osgeo.org/openlayers/ticket/1910), but this patch is already included.

Has someone another idea?

Thanks,
leene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120105/83a70e31/attachment.html


More information about the Users mailing list