3

首先感谢您的帮助。我正在使用 html2canvas 获取我的应用程序网络的图像并在社交网络中分享。在应用程序中有一个带有画布层的传单地图,但结果图像不完整。我L_PREFER_CANVAS = true;在传单地图中放置了强制画布的选项。我也使用了传单图像插件,但它只返回底图,我也需要图例。

非常感谢。

html2canvas 的结果

在js中

 html2canvas(document.body, {
      allowTaint : false,
      logging : true,
      taintTest: false,
      useCORS: true,
      onrendered: function(canvas) {
        // canvas is the final rendered <canvas> element
        dataURL = canvas.toDataURL("image/png");  
        console.info(dataURL);          
        window.open(dataURL);
      }
    });   

日志

记录html2canvas

4

0 回答 0