[OpenLayers-Dev] Need ideas for VML feature text label rendering speed improvement

Cliang thephatness.nabble at mailnull.com
Wed Apr 7 15:01:11 EDT 2010

Hi Devs,

First of all, great work! It has been a pleasure to use the framework.

My app contains a vector based drilldown style map. United States (labels: 2
char state abbreviation) -> State (labels: 2 char county abbreviation) ->
County (labels: 5 digit Zip code). The target browser is IE 7/8. While it
renders fine on non-IE browsers, IE itself spends a significant amount of
time drawing text according to the built-in profiling tool. I've tweaked the
geometries to have max 2000 vertices but some levels contain over 200
features (extreme cases: 254 Texas counties, 282 Los Angeles zip codes).

I was thinking of preventing the label from being drawn if it does not fit
within the width of the geometry at the centroid for the current zoom. It
seems like some time is spent rendering the VML textbox offline to determine
the size. I would be fine with estimating the width from the number of
characters since the label text characters are relatively equal width. VML
rendering is beyond what my brain can wrap around so any suggestions of how
I can tweak VML.js to do this?

View this message in context: http://n2.nabble.com/Need-ideas-for-VML-feature-text-label-rendering-speed-improvement-tp4866820p4866820.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.

More information about the Dev mailing list