TrafficControl | MapGL | 2GIS Documentation
MapGL JS API

TrafficControl

A control for enabling a traffic layer on the map. It appears on the map only if you set the trafficControl option within @type MapOptions to true.

Extends: Control
new constructor(map, options)

Example:

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

The map instance.

options
ControlOptions

Control options.

Returns
Methods