ScaleControl | MapGL | 2GIS Documentation
MapGL JS API

ScaleControl

A control that shows the scale line for the current map state. It appears on the map only if you set the scaleControl option within @type MapOptions to true.

Extends: Control
new constructor(map, options)

Example:

const control = new mapgl.ScaleControl(
    map,
    { position: 'topRight' },
);
Parameters
map
Map

The map instance.

options
ControlOptions

Control options.

Returns
Methods