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

Heidt, Christopher M. CHRISTOPHER.M.HEIDT at saic.com
Wed Mar 18 09:32:35 EDT 2009


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]
On Behalf Of Tiemens, Gerben
Sent: Wednesday, March 18, 2009 5:15 AM
To: Ivan Grcic
Cc: 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] 
Verzonden: Tuesday, March 17, 2009 5:07 PM
Aan: Tiemens, Gerben
CC: 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>


	 
	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

<< 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/20090318/7c15811c/attachment.html


More information about the Users mailing list