Skip to main content

Raster object

To add a raster to the map, specify the required bounds and image.

const raster = new mapgl.Raster(map, {
bounds: {
southWest: [55.281050902571224, 25.212929864063227],
northEast: [55.35650909743233, 25.258745846312053],
},
image: {
url: `https://docs.2gis.com/img/mapgl/cloud.png`,
},
});