<div dir="ltr"><div>Thanks Xavier, I will take a look at that. <br><br></div>Another question about clustering: Can you continuously add features to a clustered layer and have it re-cluster each time a new feature is added? I'm having an issue where it's just replacing the previous feature with the new one and I'm wondering if it's something I'm doing.<br>
<br>Thanks in advance!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 1:15 PM, Xavier Mamano (jorix) <span dir="ltr"><<a href="mailto:xavier.mamano@gmail.com" target="_blank">xavier.mamano@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
This is not supported by the OL standard. Some time ago I wrote some code to<br>
adjust issues in Cluster strategy, I think this problem is also solved in my<br>
code.<br>
<br>
Try use:<br>
<br>
<a href="https://github.com/jorix/OL-Ragbag/blob/gh-pages/lib/Ragbag/Strategy/CenteredCluster.js" target="_blank">https://github.com/jorix/OL-Ragbag/blob/gh-pages/lib/Ragbag/Strategy/CenteredCluster.js</a><br>
<br>
See example:<br>
<br>
<a href="http://jorix.github.io/OL-Ragbag/examples/strategy-centered-cluster-add-remove.html" target="_blank">http://jorix.github.io/OL-Ragbag/examples/strategy-centered-cluster-add-remove.html</a><br>
This example allows dynamically add points, and enable/disable the Cluster<br>
strategy. But only deletes the entire cluster (while strategy is enabled),<br>
otherwise it should work with the js (while Cluster strategy is active in<br>
the layer are clusters that contains a array of features --named cluster--)<br>
<div class="im"><br>
> but it seems the strategy itself keeps a cache of the features.<br>
</div>Yes, named teatures. In this aspect disable cluster works differently than<br>
OL staqndad code, the features of the layer are restored.<br>
<br>
Xavier<br>
<br>
<br>
dnbphysicist wrote<br>
<div><div class="h5">> Hello all, I've done some searching on Google of this, but haven't found a<br>
> good way to accomplish it yet. I have a map that allows other applications<br>
> to add and remove layers and features from it dynamically. If a vector<br>
> layer is clustered and another application goes to delete one or more of<br>
> the features in the cluster, obviously the remove features function is not<br>
> going to work. Is there a good way to do this? I tried iterating over all<br>
> of the clusters, and then the features in that cluster but it seems the<br>
> strategy itself keeps a cache of the features. I also tried deactivating<br>
> the strategy, but it seems that just causes the layer to retain the<br>
> clusters as features and no longer expands or contracts with zoom ins and<br>
> outs (not surprisingly). Any help would be greatly appreciated.<br>
><br>
> Thanks in advance!<br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
<br>
> Users@.osgeo<br>
<br>
> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Removing-features-from-a-cluster-tp5098224p5098245.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Removing-features-from-a-cluster-tp5098224p5098245.html</a><br>

Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div style="text-align:left"><b>HYX</b> </div><div style="text-align:left"><a href="http://hyx-music.com" target="_blank">http://hyx-music.com</a></div>
</div>