[OpenLayers-Users] recenter on a vector layer with Cluster strategy on

Didrik Pinte lists at dipole-consulting.com
Thu Dec 11 04:16:44 EST 2008


On Thu, 2008-12-11 at 08:39 +0100, Didrik Pinte wrote:
> > 
> > getDataExtent only works against the features currently in the layer --
> > it isn'at aware of the 'subfeatures' inside the clusters. 
> 
> Ok, that explains the problem but the clusters have a data extent that
> should approximately match the one of all the features, no ?

I have investigated a bit further. The Cluster strategy hides the
clustered feature inside the cluster but the cluster is a feature inside
the original layer. Thus, getDataExtent should get back with a bounding
box around all the clusters and other features of the layer. In my case,
the bounding box is just wrong, correctly centered but zoom is much too
close, subsequently you see no data ;-)

Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081211/f39b5474/attachment.bin


More information about the Users mailing list