Closed lewisMachilika closed 2 years ago
i just needed to call the below code outside onMapClick function it worked fine
domtoimage.toBlob(document.getElementById('map'))
.then(function (blob) {
var image = new Image();
image.src = URL.createObjectURL(blob);
$("#map").html("<img src=\"\" id=\"my_location\"/>");
$("#my_location").attr({'src':image.src});
});
i have the below code that is able to capture the map to a png file using dom-to-image however the markers on the map are not captured. I wanted to capture them as well how can I achieve that?