RulerControl | MapGL | 2GIS Documentation
MapGL JS API

RulerControl

A class that provides a ruler control on the map.

Extends: Control
new constructor(map, options)

Example:

const control = new mapgl.RulerControl(map, {{ position: 'centerRight' }});
control.getRuler().setPoints([
    [55.31878, 25.23584],
    [55.35878, 25.23584],
    [55.35878, 25.26584],
]);
Parameters
map
Map

The map instance.

options
RulerControlOptions

Ruler control initialization options.

Returns
Methods