openlayers/ol3 — pull request #850 by ahocevar (2013-07-02 13:03:00+00:00)
Title: Render changes when adding and removing features

This change adds a removeFeatures method to the vector layer, and lets the renderer listen to events to make sure that adding and removing features updates the map view.

This could use some tests, but it is ready for review. For now, manual testing can be done by using the console on the vector-layer example. Zoom to the United Arab Emirates, and then do the following on the console:

var feature = vector.featureCache_.idLookup_[28];
vector.removeFeatures([feature]);

Now the United Arab Emirates should be removed from the map.

vector.addFeatures([feature]);

And now they should be added again.