OpenLayers.Handler.Polygon - OpenLayers

# OpenLayers.Handler.Polygon

Handler to draw a polygon on the map. Polygon is displayed on mouse down, moves on mouse move, and is finished on mouse up.

#### Inherits from

- OpenLayers.Handler.Path
- OpenLayers.Handler

Summary

OpenLayers.Handler.Polygon | Handler to draw a polygon on the map.
Properties |
holeModifier | {String} Key modifier to trigger hole digitizing.
Constructor |
OpenLayers.Handler.Polygon | Create a Polygon Handler.
Functions |
cancel | Finish the geometry and call the “cancel” callback.

### Properties

### holeModifier

{String} Key modifier to trigger hole digitizing. Acceptable values are “altKey”, “shiftKey”, or “ctrlKey”. If not set, no hole digitizing will take place. Default is null.

### Constructor

### OpenLayers.Handler.Polygon

Create a Polygon Handler.

#### Parameters

control | {OpenLayers.Control} The control that owns this handler
callbacks | {Object} An object with a properties whose values are functions. Various callbacks described below.
options | {Object} An optional object with properties to be set on the handler

#### Named callbacks

create | Called when a sketch is first created. Callback called with the creation point geometry and sketch feature.
modify | Called with each move of a vertex with the vertex (point) geometry and the sketch feature.
point | Called as each point is added. Receives the new point geometry.
done | Called when the point drawing is finished. The callback will recieve a single argument, the polygon geometry.
cancel | Called when the handler is deactivated while drawing. The cancel callback will receive a geometry.

### Functions

### cancel

> cancel: function()

Finish the geometry and call the “cancel” callback.

> cancel: function()

Finish the geometry and call the “cancel” callback.
Handler to draw a path on the map.
Base class to construct a higher-level handler for event sequences.
Controls affect the display or behavior of the map.
Close