I recently attempted to use html2canvas to capture a Google Map image, but unfortunately, the resulting image only displayed the map's direction and not the actual map. Can anyone provide assistance with this issue? Below is the code snippet along with a reference image.
function getScreenShot() {
html2canvas(document.querySelector("#map")).then(canvas => {
var img = canvas.toDataURL();
window.open(img);
height=height,
width=width
});
}