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

Tiemens, Gerben Gerben.Tiemens at grontmij.nl
Fri Mar 20 05:12:48 EDT 2009


Thats right,

But I wanted it to work on a webserver without any rights to run a mapping server. (only clientside code allowed). I know how to do it on Mapserver or Geoserver ;)

It would be nice if the GML layer as an option only binds the vectors that are in view. Like the wfs, but then on file based sources. And then requests every time a new set of vectors to bind on zoom or moving.


Greets
Gerben

________________________________
Van: users-bounces at openlayers.org [users-bounces at openlayers.org] namens Ivan Grcic [igrcic at gmail.com]
Verzonden: woensdag 18 maart 2009 16:40
Aan: Heidt, Christopher M.
CC: users at openlayers.org
Onderwerp: Re: [OpenLayers-Users] Strategy cluster and slow map behavior.

I guess it shouldnt be too hard to do it with geoserver

cheers

2009/3/18 Heidt, Christopher M. <CHRISTOPHER.M.HEIDT at saic.com<mailto:CHRISTOPHER.M.HEIDT at saic.com>>
If your just pointing directly to a large kml file then you are right,
but most systems have a handler that generates kml based on parameters.

________________________________
From: users-bounces at openlayers.org<mailto:users-bounces at openlayers.org> [mailto:users-bounces at openlayers.org<mailto:users-bounces at openlayers.org>] On Behalf Of Tiemens, Gerben
Sent: Wednesday, March 18, 2009 5:15 AM
To: Ivan Grcic
Cc: users at openlayers.org<mailto:users at openlayers.org>
Subject: Re: [OpenLayers-Users] Strategy cluster and slow map behavior.

Thanks for your answer.

I already searched in the way of WFS, but wanted it first to work with a simple KML. As searching in the mailinglist and other resources didn't give a solution, I will have to move to a WFS solution.
BBOX strategy will not work on KML so that is nog the right way to go.

Maybe there might be an idea to leave out the clusterfeatures that are out of view when using strategy cluster? Some sort of BBOX idea within the clustering, but then for not attaching all the available features in a KML to the layer, when features are out of view.(out of viewport bbox).

Greets

Gerben



________________________________
Van: Ivan Grcic [mailto:igrcic at gmail.com<mailto:igrcic at gmail.com>]
Verzonden: Tuesday, March 17, 2009 5:07 PM
Aan: Tiemens, Gerben
CC: users at openlayers.org<mailto:users at openlayers.org>
Onderwerp: Re: [OpenLayers-Users] Strategy cluster and slow map behavior.

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<mailto: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<mailto:Users at openlayers.org>
http://openlayers.org/mailman/listinfo/users




--
Ivan Grcic

<< Please read our E-mail Disclaimer at the Grontmij Corporate website >>

_______________________________________________
Users mailing list
Users at openlayers.org<mailto:Users at openlayers.org>
http://openlayers.org/mailman/listinfo/users




--
Ivan Grcic

<< Please read our E-mail Disclaimer at the Grontmij Corporate website >>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090320/c3c49202/attachment.html


More information about the Users mailing list