I am using OpenLayers.Strategy.AnimatedCluster in my application in order to cluster and show points to the end-user. The example is here. All points are located in concrete vector layer. I need to remove all features from that vector layer, but when I use removeAllFeatures or destroyFeatures then it removes clusters only from the concrete zoom level and if I zoom in and then back I see all my clusters again. How can completely remove them from the map?
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
|
|||
|
|
|
Short answer is:
UPDATE: changing resolution property of clustering strategy will force addFeatures() to redraw features. If you don't do it, features in screen will stay unchanged, until you zoom in or out. When you are using Clustering strategy, each addFeatures() destroys all previous features. With this command you are destroying old ones and you don't add any new ones. Clustering strategy holds original features in cache. When you zoom, all objects (features, that represent clusters) in vector layer are destroyed and new clusters are generated from cached features. removeAllFeatures and destroyFeatures remove only clusters, but don't affect original features in cache. |
||||
|
|