M/impl/control/Scale~Scale


import Scale from 'M/impl/control/Scale';

Main constructor of the class. Creates a WMC selector control

new Scale()

impl/ol/control/Scale.js, line 34

Extends

  • ol.control.Control

Methods

addTo(map, template)

impl/ol/control/Scale.js, line 49

This function adds the control to the specified map

Name Type Description
map M.Map

to add the plugin

template function

template of this control

destroy()

impl/ol/control/Scale.js, line 81

This function destroys this control, cleaning the HTML and unregistering all events

renderCB(mapEvent)

impl/ol/control/Scale.js, line 66

Update the scale line element.

This:
  • {ol.control.ScaleLine}
Name Type Description
mapEvent ol.MapEvent

Map event.