[OpenLayers-Dev] [Users] Markers performance

Erik Uzureau euzuro at gmail.com
Tue Oct 24 09:28:40 EDT 2006

So on thinking this over, it has occurred to me something that might
be a good solution to this problem:

A sort of blend of the OpenLayers.Layer.Markers layer and the
OpenLayers.Layer.WMS.Untiled Layer.

Basically, the problem now is this:

Let's say you are using OpenLayers.Layer.Text and load 1000
features/markers (like Andy is doing)

Each and every one of those markers gets added to the DOM,
even though given the current view, maybe only 20 or 30 of them
are visible.

The genius idea behind WMSUntiled is that it loades a tile that is
[variably] larger than the current map extent, and only loads the data
for that tile... and it is not until the user changes the extent (by panning
or zooming) such that the original tile no longer covers the entire map
extent that the layer has to reload data.

Well, we could really do the same thing for markers, right? Keep all
the markers in the OpenLayers.Layer.Makers.markers[] array and then
each time we need to load a tile, scan the markers array to see which
of them fall inside the bounds.

...which of course leads me to think that we could do some restructuring
of the layers classes. I have for long felt that WMS/Untiled.js was a bit

First of all, it *is* tiled. It's just that there's only ever *one* tile. So
to start
with, it might make more sense to call it  SingeTile or UnGridded or
something along those lines.

Furthermore, if we are going to have an UnGridded WMS, why shouldn't
we have an UnGridded WFS?

Obviously, the class rearrangements would require a significant amount
of work and rewriting and testing, etc.

For Andy's problem, writing a simple UnGridded/SingleTiled Marker layer
would not be particularly difficult.

Is anyone out there interested in any of this?


On 10/18/06, Erik Uzureau <euzuro at gmail.com> wrote:
> Dear andy,
> How many text markers are we talking about here? It is a known limitation
> of browsers that they cannot handle displaying (and then moving around)
> large numbers of Div DOMElements... especially with IE.
> If you can tell us a little more about what you're trying to do, maybe we
> can
> help you better. :-)
> --Erik
> On 10/18/06, andy <aborruso at tin.it> wrote:
> > Dear all,
> > I need an advice. I must use a marker layer for its tooltip feature. I
> > have used "OpenLayers.Layer.Text", I have had what I need but I have
> > slowness when I have a lot of text markers.
> > Are the other methods to create markers faster? Which is fastest?
> >
> > Thank you,
> >
> > a
> >
> > P.S. In the openlayers home page there is an inaccessible link:
> > http://openlayers.org/presentations/foss4g2006/examples/
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20061024/9be40ffc/attachment.html

More information about the Dev mailing list