[OpenLayers-Users] Users Digest, Vol 74, Issue 15
Jim White
jbw2003 at earthlink.net
Tue Nov 6 12:48:44 PST 2012
This is missing in 2.12 documentation. I'll give it a try and see if it
works. Thanks.
Jim
On 11/06/2012 03:00 PM, openlayers-users-request at lists.osgeo.org wrote:
> Hi,
>
> I think the way is to call
> `cacheFeatures({features:array_clustered_elements})` of the strategy (I say
> this without trying)
>
> where `array_clustered_elements` is:
> (adaptation of a piece of code that I use)
>
> var features = yourVectorLayer.features;
> var array_clustered_elements = [];
> for(var i=0, len=features.length; i<len; i++){
> var feature = features[i];
> if (feature.geometry) {
> if (feature.cluster) {
> for(var ii=0, ilen=feature.cluster.length; ii<ilen;
> ii++){
> array_clustered_elements.push(feature.cluster[ii]);
> }
> } else {
> array_clustered_elements.push(feature);
> }
> }
> }
>
>
>
> Regards,
>
> Xavier Mamano
>
> <quote author="jim white">
> Hi,
>
> I am trying to make a selector on a vector layer with clustering by
> deleting cluster points. This I am able to do, but can not get the
> vector layer to redraw. If I zoom in and zoom out get what I would like
> to see, but need to find out how to get this to redraw with scripting.
>
> Thanks,
> Jim White
> http://whitecodingandmaps.com/
More information about the Users
mailing list