[OpenLayers-Users] Problems with labels

Dariusz Bączkowski dariusz.baczkowski at esyscoder.pl
Fri Jul 27 06:49:56 PDT 2012


Dnia piątek, 27 lipca 2012 o 14:32:43 Alexandre Dubé napisał(a):
> Hi Dariusz,
> 
> I had the same issue back in 2010. Here's the workaround I used to
> bypass the issue :
> 
> layer.renderer.textRoot = layer.renderer.vectorRoot;
> 
> That way, both text and geometry are rendered in the same container and
> avoid the overlapping labels. See my [original post] and also the small
> [demo] containing the fix, in which you need to zoom out a little to see
> features with their labels on top of others.
> 
> As mentionned, this is a workaround. It didn't work well in IE8 with WML
> so I had to emulate IE7. If you find something better, let us know.

It works, thank you for help. 

IE9 is OK. 
IE8 mode is still the same.
IE7 mode crashes browser :)
I can just ask customers to upgrade to IE9, so it is good solution for me. 

> 
> HTH,
> 
> Alexandre
> 
> [original post]
> http://osgeo-org.1560.n6.nabble.com/Overlapping-labels-td3924879.html
> [demo] http://bs-dev2.mapgears.com/webmap/
> 
> On 12-07-26 04:50 PM, Dariusz Bączkowski wrote:
> > Hello,
> > 
> > I have problems with labels. It looks like this:
> > http://getmt.pl/labels.png
> > I would like it to have graphics cover labels according to z index and
> > last drown order. Right now it looks like all graphics are being drawn
> > at once and then all labels at once. This is SVG renderer.
> > 
> > With Canvas i get something like this (offset not working):
> > http://getmt.pl/labels_canvas.png
> > code is not changed only renderers order.
> > 
> > Is there something I can do to fix thoes issues?

-- 
Pozdrawiam,
Dariusz Bączkowski

e-mail: dariusz.baczkowski at esyscoder.pl
tel.: +48 609 123 954

ESYSCODER Dariusz Bączkowski
ul. Lelewela 13A/7
75-450 Koszalin
NIP: 669-238-28-99

www.esyscoder.pl
e-mail: biuro at esyscoder.pl
tel.: +48 609 123 954
fax: +48 947 166 554


More information about the Users mailing list