You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constpuppeteer=require('puppeteer');(async()=>{constbrowser=awaitpuppeteer.launch({// headless: false,});constpage=awaitbrowser.newPage();// Test for webgl support// e.g. https://developer.mozilla.org/en-US/docs/Learn/WebGL/By_example/Detect_WebGLconstwebgl=awaitpage.evaluate(()=>{constcanvas=document.createElement('canvas');constgl=canvas.getContext('webgl');constexpGl=canvas.getContext('experimental-webgl');return{gl: gl&&glinstanceofWebGLRenderingContext,expGl: expGl&&expGlinstanceofWebGLRenderingContext,};});console.log('WebGL Support:',webgl);awaitbrowser.close();})();
环境
问题描述
在本地
linux
虚拟机中使用puppeteer
截图网页DOM时,高德地图部分未渲染(区域显示为空);但在宿主机windows
上运行同样的代码进行截图,高德地图部分全部加载linux
虚拟机中截图windows
宿主机截图排查过程
linux
为无GUI
的,无法像桌面端那样调用GPU
资源从而无法使用webgl
。遂进行如下测试:windows
与虚拟机linux
结果输出一致linux
的gpu
支持情况同时,测试高德部分地图也是可行的
https://lbs.amap.com/demo/jsapi-v2/example/district-search/draw-district-boundaries
到此,感觉是高德做了某些限制,直接找高德寻求技术支持,提供相关问题后,得到如下答复
linux
导出也正常了感谢
The text was updated successfully, but these errors were encountered: