-
Name Type Description optionsOptions
Name Type Description stylesArray.<module:cercaliagl/MapStyler~StyleLayerJSON> Layer
adaptDrawStylesToFeatureStyleboolean Servers
freehandOnDrawPolygonMobileboolean Layer
interactiveboolean Map is interactive
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 idstring Feature id
-
Disable control. Show UI buttons.
-
Enable control. Show UI buttons.
-
Return if polygon intersections are allowed
Returns:
allow Allow
-
Returns
cercaliaMap objectReturns:
Cercalia map.
-
Get class name.
Returns:
Class name.
-
Get current mode
-
Get control HTML Element
Returns:
HTML Element
-
Return feature in
GeoJSONformat by feature id.Name Type Description idstring Feature Id
Returns:
feature Feature
-
Return all drawing features in
GeoJSONformat. -
Get control id.
Returns:
Id.
-
Returns
mapboxglMap 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 featuresArray.<module:cercaliagl/Feature~Feature> Features
-
Load features via GeoJSON or geometry
Name Type Description geojsonGeoJSON GeoJSON
-
Set if polygon intersections are allowed
Name Type Description allowboolean Allow
-
Set disable drag when editing
Name Type Description disableboolean 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 featureIdstring propertystring property
valuestring value
-
Enable select mode to select features. After select it is possible to delete features. Hit and hold
Shiftkey if you want to select more features. -
Enable or disable snapping
Name Type Description enabledboolean Enabled
-
Static mode shows drawn features but in this mode it is not possible to edit them.
-
Show control.