Draw

The Draw widget enables you to draw basic graphics and text on the map.

The following table lists the configurable attributes of the Draw widget:

AttributeDescription

distanceUnits

Object[]. There is no default. The units used to measure distance. The properties are as follows:

  • unit—String. There is no default. The unit name.
  • abbr—String. There is no default. The unit abbreviation.

Example:

"distanceUnits": [{
  "unit": "KILOMETERS",
  "abbr": "km"
}, {
  "unit": "MILES",
  "abbr": "mi"
}, {
  "unit": "METERS",
  "abbr": "m"
}, {
  "unit": "FEET",
  "abbr": "ft"
}, {
  "unit": "YARDS",
  "abbr": "yd"
}]

areaUnits

Object[]. There is no default—The units used to measure area.

The properties are as follows:

  • unit—String. There is no default. The unit name.
  • abbr—String. There is no default. The unit abbreviation.

Example:

"areaUnits": [{
  "unit": "SQUARE_KILOMETERS",
  "abbr": "sq km"
}, {
  "unit": "SQUARE_MILES",
  "abbr": "sq mi"
}, {
  "unit": "ACRES",
  "abbr": "ac"
}, {
  "unit": "HECTARES",
  "abbr": "ha"
}, {
  "unit": "SQUARE_METERS",
  "abbr": "sq m"
}, {
  "unit": "SQUARE_FEET",
  "abbr": "sq ft"
}, {
  "unit": "SQUARE_YARDS",
  "abbr": "sq yd"
}]

isOperationalLayer

Boolean. The default value is false. If true, drawings are saved as feature layers.