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

Label

Class for creating labels on the map.

new constructor(map, options)

Example:

const label = new mapgl.Label(map, {
    coordinates: map.getCenter(),
    text: 'There is hope',
    color: '#ff0000',
    fontSize: 24,
});
Parameters
map
Map

The map instance.

options
LabelOptions

Label options.

Returns
Methods