Ruler | MapGL | 2GIS Documentation
MapGL JS API
Личный кабинет

Ruler

A class that provides ruler functionality.

new constructor(map, options)

Example:

const ruler = new mapgl.Ruler(map, {});
ruler.setPoints([
    [55.31878, 25.23584],
    [55.35878, 25.23584],
    [55.35878, 25.26584],
]);
Parameters
map
Map

The map instance.

options
RulerOptions

Ruler initialization options.

Returns
Methods