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

Directions

A class that provides driving direction functionality.

new constructor(map, options)

Example:

const directions = new mapgl.Directions(map, {
    directionsApiKey: 'Your Directions API access key',
});

directions.carRoute({
    points: [
        [55.2772379, 25.2377810],
        [55.2986956, 25.2576546],
    ],
});
Parameters
map
mapgl.Map

The map instance.

options
DirectionsOptions

Directions initialization options.

Returns
Methods