[OpenLayers-Users] VML renderer to do labels as divs not VML rect + textbox

Janis Elmeris janis.elmeris at intelligentsystems.lv
Thu Jul 28 08:51:09 EDT 2011


Hello!

I'm adding Geometry.Points to the map with "label" property in order to 
display numbers. However, my IE7 cannot deal with more than 100-200 such 
numbers without slowing down considerably and eventually crashing 
(whereas FF can do all right even with 3000: using both SVG or Canvas 
renderer).

How hard would it be to make the VML renderer to do these label points 
as "div" elements? Currently they are rendered as VML "textbox" within 
"rect", which IE apparently process slowly. "div" elements would surely 
be faster, right?

I tried to simply replace the "rect" and "textbox" in "drawText" to 
"div" and "span", but that didn't work: the numbers were positioned 
oddly while moving the map. In the original VML renderer it seems that 
"rect" is not changed while moving the map (and I cannot understand why 
these "rect" are needed at all), but "textbox" changes its margins. I 
cannot find what is changing them though.

Regards,
Janis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110728/4b1b0aff/attachment.html


More information about the Users mailing list