[OpenLayers-Users] Strategy cluster and slow map behavior.

Ivan Grcic igrcic at gmail.com
Tue Mar 17 12:06:37 EDT 2009


Hi Tiemens,

the problem is that the more you zoom in, more and more clusters are
created. So at the first several levels, you only have several clusters,
thats why it takes relativly small amount of time. The more you zoom in, it
takes lots of time to calculate clusters.

This is happening because you are working with all the features all the
time, regardless of the bbox of the map (not good solution if you have more
then 50-100 features)

I suggest: using BBOX strategy that filters out the features depending on
map extents, together with wfs protocol. Then it should work pretty fast.

HINT: check ratio parametar and http://trac.openlayers.org/ticket/1830

Cheers


2009/3/17 Tiemens, Gerben <Gerben.Tiemens at grontmij.nl>

>
> Hello OpenLayers List users,
>
>
> I'm implementing the cluster strategy and im facing a problem. I have a 500
> features on the map from a KML file, with google layer as baselayer.
> With clustering on the KML layer, the map acts really slow. When zooming
> in, the map acts slower and slower. Every zoom step, the next zoomstep will
> be slower.
> When clustering is off, the map acts fast again, even it has more features
> on it.
> I turned of the special styling, but even that does not help in this case.
> The map keeps acting slow with each zoom action.
>
>
> My site is: http://www.getiem.nl/mineralmap/mineralmap.html
> The javascript is on  http://www.getiem.nl/mineralmap/strahlen.js
>
>
> Does anyone have an idea why clustering is slowing down on the zoomed in
> map?
> Is this a bug or issue to resolve?
> Maybe you see a flaw in my code.
>
>
>
>    1. Steps to reproduce:
>    2. Zoom in on the map.
>    3. When zoomed in to lets say the Netherlands, its slowed down to
>    seconds,
>    4. when zooming further, each step takes longer.
>
>
>
> My first insights are:  all features are drawn in memory (also features
> outside map), and thats why it is taking longer when zoomed in: it draws all
> 500 features.  But thats not satisfying, since loading all features at once
> and then zooming in is faster.
>
>
> Greetings
>
> Gerben
>
>
>
> << Please read our E-mail Disclaimer at the Grontmij Corporate website >>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>


-- 
Ivan Grcic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090317/7c6d4e1a/attachment.html


More information about the Users mailing list