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.

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.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.