2

The div #map-canvas contains a Google map.

I tried following code:

$('#map-canvas').html2canvas({
    onrendered: function (canvas) {
        var img = canvas.toDataURL("image/png");
        document.getElementById("myForm").submit();
    }
});

<input type="submit" value="Take Screenshot Of Div" onclick="capture();" />
<form method="POST" enctype="multipart/form-data" action="save.php" id="myForm">
    <input type="hidden" name="img_val" id="img_val" value="" />
</form>

Using this code I am getting a blank map.

enter image description here

Drenmi
  • 8,492
  • 4
  • 42
  • 51

1 Answers1

-1

This link may help you to get map image...

vasanth
  • 224
  • 3
  • 19