问题描述
我正在使用deck.gl层在Google Map层顶部绘制图标,并使用HTML2Canvas对其进行截图。用于Html2Canvas的options对象是-
const [ imgIndex,setImgIndex ] = useState(0);
<Pannellum
ref={pano}
id={uuid()}
width="100vw"
height="100vh"
image={panoImgsUrl[imgIndex]}
pitch={panoImgData[0] ? panoImgData[0].pitch : 0}
yaw={ panoImgData[0] ? panoImgData[0].yaw : 0}
hfov={100}
autoLoad = {true}
showZoomCtrl={false}
showFullscreenCtrl={false}
howControls ={true}
compass={false}
onLoad={() => { pano.current.getViewer().setHfov(70) ; setLookAtCard(false)}}
onRender= { () => { setNowYaw(pano.current.getViewer().getYaw()) ;console.log(pano.current);} }
>
{sceneHotSpots}
</Pannellum>
我正在通过传递allowTaint: true,letterRendering: 1,foreignObjectRendering: true,quality: 1,width: width,height: height,scale: ratio,useCORS: true
作为源来截屏。问题是,有时屏幕截图会正确显示,并在Google Maps上标出图标,但有时它只显示没有图标层的Google Map。我无法调试为什么会这样。在两种情况下,Html2Canvas生成的日志看起来都是相同的。任何帮助将不胜感激。谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)