Extends
Members
-
allowPolygonIntersection{Boolean}
-
Allow polygon intersections when drawing, true by default
-
onDelete{function} {null}
-
-
onDeselect{function} {null}
-
-
onDrawEnd{function} {null}
-
-
onModify{function} {null}
-
-
onSelect{function} {null}
-
Methods
-
Delete all drawn features
-
Delete feature by id
Name Type Description id
string Feature id
-
Disable control. Show UI buttons.
-
Enable control. Show UI buttons.
-
Return if polygon intersections are allowed
Returns:
allow Allow
-
Returns
cercalia
Map objectReturns:
Cercalia map.
-
Get class name.
Returns:
Class name.
-
Get current mode
-
Get control HTML Element
Returns:
HTML Element
-
Return feature in
GeoJSON
format by feature id.Name Type Description id
string Feature Id
Returns:
feature Feature
-
Return all drawing features in
GeoJSON
format. -
Get control id.
Returns:
Id.
-
Returns
mapboxgl
Map object -
Get control name. Null if control has not defined name.
Returns:
Class name.
-
Hide control.
-
Load Cercalia Features to draw control. Then you can modify them or delete.
Name Type Description features
Array.<Feature> Features
-
Load features via GeoJSON or geometry
Name Type Description geojson
GeoJSON GeoJSON
-
Set if polygon intersections are allowed
Name Type Description allow
boolean Allow
-
Set disable drag when editing
Name Type Description disable
boolean Disable
-
Enable draw polygon interaction
-
Enable draw polygon interaction
-
Enable draw linestring interaction
-
Enable draw polygon interaction with magnetic closes
-
Enable draw polygon interaction
-
Sets a property on the given feature
Name Type Description featureId
string property
string property
value
string value
-
Enable select mode to select features. After select it is possible to delete features. Hit and hold
Shift
key if you want to select more features. -
Enable or disable snapping
Name Type Description enabled
boolean Enabled
-
Static mode shows drawn features but in this mode it is not possible to edit them.
-
Show control.