gem.control. DrawAreaOnMapControl

new DrawAreaOnMapControl(addedDataControl, drawOptions)

Control for drawing an area on the map canvas

Parameters:
NameTypeDescription
addedDataControlgem.control.CustomQueryAddedDataControl
drawOptionsobject

draw area control options

Properties
NameTypeAttributesDescription
buttonobject

start/stop drawing button options

Properties
NameTypeAttributesDefaultDescription
parentContainerstring

the parent element id where to add the draw button element

activateTextstring<optional>
'Draw area on map'

button text to display for starting a draw area operation

deactivateTextstring<optional>
'Stop drawing'

button text to display for stopping a draw area operation

cssClassstring<optional>
'gem-draw-button'

set custom style rules for the start/stop draw button

dialogPopupobject<optional>

dialog popup for invalid area options

Properties
NameTypeAttributesDefaultDescription
cssClassstring<optional>
'gem-dialog-popup'

set custom style rules for the dialog

textInfostring<optional>
'Please draw an area'

text to display in the dialog

cssDismissButtonstring<optional>
'gem-draw-button'

set custom style rules for the dismiss dialog button

dismissTextstring<optional>
'Ok'

text to display in the dismiss dialog button

drawStyleobject<optional>

specify custom drawing options for the area

Properties
NameTypeAttributesDefaultDescription
lineWidthnumber<optional>
3

set custom line width in px

lineCapstring<optional>
'round'

other options are 'butt' or 'square'

lineJoinstring<optional>
'round'

other options are 'bevel' or 'miter'

strokestring<optional>
'rgba(55, 71, 79, 0.9)'

set custom stroke style

fillstring<optional>
'rgba(129, 156, 169, 0.4)'

set custom fill style

areaDataobject<optional>

options for data source inside the area

Properties
NameTypeAttributesDefaultDescription
maxCoordsnumber<optional>
900

specify maximum number of coordinates to collect from the drawing

markerGroupMaxLevelnumber<optional>
13

specify markers maximum grouping level