Closed dd-fadhilah closed 7 years ago
@dd-fadhilah This looks like a bug or limitation of "html2canvas-0.4.1".
I'm trying v0.5.0
Hi,
I've tried to replace with v0.5.0 (https://liveperson-consumer-marketing.s3.amazonaws.com/prestoexperts/html2canvas/html2canvas-0.5.js), but still no luck.
`
` ```Below is the code:
<script type="text/javascript" src="https://liveperson-consumer-marketing.s3.amazonaws.com/prestoexperts/html2canvas/html2canvas-0.5.js"></script>
<script type="text/javascript">
var map = null;
function initialize() {
var parametreCarteVillage = {
zoom : 9,
center : new google.maps.LatLng(38.959409, -87.289124),
disableDoubleClickZoom : false,
draggable : true,
scrollwheel : true,
panControl : false,
disableDefaultUI : true,
mapTypeControl : true,
keyboardShortcuts : true,
mapTypeId : google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById('map_canvas'), parametreCarteVillage);
var marker = new google.maps.Marker({
position:new google.maps.LatLng(38.959409,-87.289124),
map: map,
title: 'Title!'
});
}
window.onload = function () {
initialize();
function convert(target) {
html2canvas(target, {
"proxy": "../html2canvasproxy.php",
"logging": true, //Enable log (use Web Console for get Errors and Warnings)
"onrendered": function(canvas) {
var img = new Image();
img.onload = function () {
img.onload = null;
document.getElementById("output").appendChild(img);
};
img.src = canvas.toDataURL("image/png");
}
});
}
document.getElementById("save1").onclick = function () {
convert(document.getElementById("map_canvas"));
};
document.getElementById("save2").onclick = function () {
convert(document.getElementById("container"));
};
};
</script>
v0.5.0 not work because proxy system is changed, I am creating a modification of my proxy to work with this version. @dd-fadhilah
Ok, thanks for the update ;) I'm looking forward for the new proxy.
Thanks again.
@dd-fadhilah Fixed in 0.2.0: https://github.com/brcontainer/html2canvas-php-proxy/commit/10dd9bd52f6d523ff05e3d2a6499c2743ec7ee5e
Hi,
I've tried to download the folder and run on my localhost. I tried to run one of the examples given (google-maps.html) and it works, but the screenshot does not capture the map pin/marker. Is that it was supposed to work? How do I capture the marker with the google maps?
Thanks.