I have been trying for a while on how to capture screenshot of a map. Finally managed to get in working on Chrome using Html2Canvas, capture screenshot functionality.
$('#map_canvas').html2canvas({
proxy: "server.js",
useCORS: true,
onrendered: function (canvas) {
//Set hidden field's value to image data (base-64 string)
$('#img_val').val(canvas.toDataURL("image/png"));
}
});
I was initially missing the proxy and useCORS property. Now the problem is that only the base map is captured and the markers that are plotted on them are not getting captured. Same is the case with the overlays on map. they are also not captured. How can i get this to work???? Any help would be great!!!
Thanks in advance,