When working with vector information, most probably, one of the most common things we can do in a GIS application is: add new features.
OpenLayers has plenty of controls, so there is no need to reinvent the wheel. We have a set of tools and the only thing we need to do is learn how to use each one.
For this concrete purpose, add new features. OpenLayers has the
OpenLayers.Control.EditingToolbar control that shows a toolbar with some buttons to add polygons, polylines, and points:
Because we can have many vector layers in the map, the control needs us to specify the layer it must work on.
In addition to showing ...