[OpenLayers-Users] Slow marker rendering in IE

Jani Patokallio jpatokal at iki.fi
Tue Dec 2 11:26:56 EST 2008


Greetings,

I have an OpenLayers-based site (http://openflights.org) that renders
airport markers and flight vectors on a world map, and while it's
reasonably snappy on Firefox, it's very slow on IE.  I've turned off the
alpha hack, but this did not seem to make any difference at all.

Searching through the archives, there was a mail (*) that suggested
that, instead of using a separate mousedown event handler for each
marker (which is what I'm doing right now), you should "replace it with
an event handler on the container and then using the target property to
determine if one of the smaller elements had been clicked".  If the
container of a Marker is its Layer.Markers, how do I set an event
handler on it and determine the target?

* http://www.mail-archive.com/dev@openlayers.org/msg00084.html

Also, ideas for how to speed up rendering at the world level, when there
may be >1000 airports on the map, are welcome.  My current thinking is
to load all markers into the layer, but listen to the map's zoom events
and call marker.display(true/false) to toggle them on/off when zooming
in/out.  There are no faster-rendering clickable alternatives to PNG
icons, right?

Cheers,
-jani




More information about the Users mailing list