AnsweredAssumed Answered

Export Vector Tiles as screenshot using canvas.todataURL ()

Question asked by fancelinesri-ca-esridist Employee on Mar 18, 2020
Latest reply on Mar 23, 2020 by NSager-esristaff

Hello GIS community.


I am developing a Web App Builder widget that can take a screenshot of the entire WAB application (this is why the Print widget is not used). I am using HTML2Canvas.js so far and it works great with Raster basemaps, and Feature layers. Vector Tiles do not seem to be rendered.


As a matter of fact, even if I can canvas.toDataURL() on the cavas generated by WAB to represent the vector tile, I only get a transparent image. I know the 4.x API has a takeScreenshot method on a MapView, so I was expecting doing a screenshot of the Vectory Tiles to be an easy win.


Does anybody know why the canvas generated by Vectory tiles can not be exported? Is there some CORS resources there that are tainting the cavas? In that case, how would the MapView.takeScreenshot work in the 4.x API.


Kind regards,