how to remove a vector (polygon)

Hi there,

does anybody know how to remove a polygon (vector) in the map.
I can draw it, but i also want to remove it.

I just know the options acivate and deactivate

greetings from germany,

In Potlatch click on area and press shift delete, this wrks for lines as well

Thank you for the answer, but i dont want to use potlatch.
Isn’t there any other solution for my problem.

like polygon.remove?

polygon = new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.Polygon);

and some times later i just want to write a function to remove that polygon.


Your question is for OpenLayers rather than OSM.
See Vector object documentation on the OpenLayers wiki.

Oh and please don’t delete the object in Potlatch. :slight_smile: