new Draw(options)
A class to provide the user with drawing tools
Parameters:
Name | Type | Description |
---|---|---|
options |
nyc.ol.Draw.Options | Constructor options |
- Source:
Members
(static) Type :string
Enumeration for feature event types
Type:
- string
Properties:
Name | Type | Description |
---|---|---|
POINT |
string | The point drawing type |
LINE |
string | The line drawing type |
POLYGON |
string | The polugon drawing type |
CIRCLE |
string | The circle drawing type |
SQUARE |
string | The square drawing type |
BOX |
string | The box drawing type |
NONE |
string | No drawing type |
- Source:
Methods
activate(type)
Activate to begin adding drawings of the specified type
Parameters:
Name | Type | Description |
---|---|---|
type |
nyc.ol.Draw.Type | The drawing type to activate |
- Source:
active() → {boolean}
Return the active state
- Source:
Returns:
The active state
- Type
- boolean
clear()
Remove all drawn features
- Source:
deactivate()
Deactivate to stop drawing
- Source:
getFeatures() → {Array.<nyc.ol.Feature>}
Get the features that have been drawn
- Source:
Returns:
The features
- Type
- Array.<nyc.ol.Feature>
Type Definitions
Options
Constructor options for nyc.ol.Draw
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
map |
ol.Map | The OpenLayers map with which the user will interact | |
style |
ol.style.Style |
<optional> |
The style to use for features added to the map |
- Source: