[OpenLayers] Deleting vectors from a vectorLayer

Hi,

Is there any easy way to delete vector from a vectorLayer?
VectorLayer class supports drawing points, lines, polygones and modifying them. But no deleting operation is suported (as far as I found).

Regards.

Hi,

Use
removeComponent
method. Indeed there should be a more intuitively named removeVector as well…

cheers,
matti

Ok thanks Matti. I was thinking of something like DrawingMode.DELETE. So that it would be an automated operation like modifying vectors.

Hi,

That could probably be implemented with the current server side API. Don’t remember if there is a handler like that in OpenLayers itself.

cheers,
matti