This example demonstrates how to take a snapshot of the map. It specifies area to be captured with top/left and bottom/right view port coordinates

Code

Snapshot functionality belongs to the mapsjs-core module of the API. The capture method of the H.Map class takes as an argument callback function that is executed when snapshot is ready, instance of H.ui.UI class to add the scale bar to the output, and top/left (50,50)-bottom/right (500,200) coordinates to specify the area of the map to capture.