HtmlMarker | MapGL | 2GIS Documentation
MapGL JS API

HtmlMarker

Class for creating an HTML marker on the map.

new constructor(map, options)

Example:

const htmlMarker = new mapgl.HtmlMarker(map, {
    coordinates: map.getCenter(),
    html: '<div>Some content</div>',
});
Parameters
map
Map

The map instance.

options
HtmlMarkerOptions

HtmlMarker options.

Returns
Methods