ScaleControl.js

ScaleControl()


constructor

ScaleControl class is responsible for displaying the scale of the map. Controls should be added using Map

Options:
  • offset(Array)The offset in pixels from the control's original position (default: [0, 0])
  • fontSize(Number)The size of control's font (default: 10)
  • fontFamily(String)The family of control's font (default: 'Tahoma')
  • fontStyle(String)The style of control's font (default: 'normal')
  • kmLabel(String)The text to display for kilometers (default: 'km')
  • mLabel(String)The text to display for meters (default: 'm')
  • miLabel(String)The text to display for miles (default: 'mi')
  • ftLabel(String)The text to display for feet (default: 'ft')
  • unitSystem(String)The unit system used by the scale. Can be metric, imperial or nauticalMiles. (default: 'metric')
Parameter Type Description
options Object The options of the control