API Docs for: 7.2
Show:

MQA.ShapeDrawingControl Class

Extends MQA.Control
Module: MQA

The Drawing control.

Constructor

MQA.ShapeDrawingControl

(
  • options
)

Parameters:

  • options Object
    • will be merged into the default options.
    • [color] String default = '#333333'
      • shape's default border color.
    • [colorAlpha] Number default = 0.7
      • shape's default border opacity, from 0 to 1.
    • [fillColor] String default = '#0000ee'
      • shape's default fill color.
    • [fillColorAlpha] Number default = 0.5
      • shape's default fill opacity, from 0 to 1.
    • [borderWidth] Number default = 5
      • shape's default border width in pixels.

Properties

controlVersion

String

Inherited from MQA.Control

The version of the control.

Methods

getHeight

() Number

Inherited from MQA.Control

Determines the height of the control by selecting the greatest height from all elements in the control subtree. Override this method to provide a custom height (in most cases this should be overridden).

Returns <Number>

The height of the control.

getHeightInternal

() private

Inherited from MQA.Control

Get the height of the control.

getMsg

(
  • key
  • defaultMsg
)
String

Inherited from MQA.Control

Provides localization support for controls with text labels.

Parameters:

  • key String

    The unique key for the message.

  • defaultMsg String

    The default message to use if the message isn't found for the localization.

Returns <String>

The localized message.

getPosition

() MQA.CornerPlacement

Inherited from MQA.Control

Returns the position of the control. A default position is set when instantiated.

Returns <MQA.CornerPlacement>

The position of the control.

getWidth

() Number

Inherited from MQA.Control

Determines the width of the control by selecting the greatest width from all elements in the the control subtree. Override this method to provide a custom width (in most cases this should be overridden).

Returns <Number>

The width of the control.

getWidthInternal

(
  • parent
)
Number private

Inherited from MQA.Control

Get the width of the control.

Parameters:

Returns <Number>

width

initialize

(
  • map
)

Inherited from MQA.Control

Initialize a control on the map.

Parameters: