Add convenience function to create a regular polygon geometryFunction

This commit is contained in:
Andreas Hocevar
2015-05-08 11:21:16 +02:00
parent 901a0f6d8e
commit 19c91235ce
4 changed files with 77 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ docs: >
Example of using the Draw interaction. Select a geometry type from the
dropdown above to start drawing. To finish drawing, click the last
point. To activate freehand drawing for lines and polygons, hold the `Shift`
key.
key. Square drawing is achieved by using Circle mode with a `geometryFunction`
that creates a 4-sided regular polygon instead of a circle.
tags: "draw, edit, freehand, vector"
---
<div class="row-fluid">
@@ -20,6 +21,7 @@ tags: "draw, edit, freehand, vector"
<option value="LineString">LineString</option>
<option value="Polygon">Polygon</option>
<option value="Circle">Circle</option>
<option value="Square">Square</option>
</select>
</form>
</div>