OpenLayers Regular Polygon Example

Shows how to use the RegularPolygon handler to draw features with different numbers of sides.

Draw Option Value
shape
snap angle
size
irregular

Regular polygons can be drawn by pointing a DrawFeature control to the RegularPolygon handler class. The options above demonstrate how the handler can be configured. Note if you are in angle snapping mode (if the snap angle is non-null) and you hold down the Shift key, you will toggle to non-snapping mode.

The irregular option allows drawing of irregular polygons. With this option, the fixed radius option is ignored.