# Draw Feature Example

# OpenLayers Draw Feature Example

point, line, linestring, polygon, box, digitizing, geometry, draw, drag

Demonstrate on-screen digitizing tools for point, line, polygon and box creation.

- navigate
- draw point
- draw line
- draw polygon
- draw box
- allow pan while drawing

With the point drawing control active, click on the map to add a point.

With the line drawing control active, click on the map to add the points that make up your line. Double-click to finish drawing.

With the polygon drawing control active, click on the map to add the points that make up your polygon. Double-click to finish drawing.

With the box drawing control active, click in the map and drag the mouse to get a rectangle. Release the mouse to finish.

With any drawing control active, paning the map can still be achieved. Drag the map as usual for that.

Hold down the shift key while drawing to activate freehand mode. While drawing lines or polygons in freehand mode, hold the mouse down and a point will be added with every mouse movement.