<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Export Vector Tiles as screenshot using canvas.todataURL () in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357169#M33058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello GIS community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Fabien&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2020 14:59:28 GMT</pubDate>
    <dc:creator>FabienAncelin</dc:creator>
    <dc:date>2020-03-18T14:59:28Z</dc:date>
    <item>
      <title>Export Vector Tiles as screenshot using canvas.todataURL ()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357169#M33058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello GIS community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Fabien&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2020 14:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357169#M33058</guid>
      <dc:creator>FabienAncelin</dc:creator>
      <dc:date>2020-03-18T14:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Export Vector Tiles as screenshot using canvas.todataURL ()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357170#M33059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabien, sorry to hear about the trouble with&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;HTML2Canvas.js. I think the&amp;nbsp;&lt;SPAN&gt;takeScreenshot() method targets an off-screen surface from which you can read the image back. Perhaps this helps with VectorTileLayers. Is there a reason why you can't use the&amp;nbsp;t&lt;SPAN style="background-color: #ffffff;"&gt;akeScreenshot() method for the custom widget?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt; &lt;A href="https://community.esri.com/migrated-users/262959"&gt;Ryan Libed&lt;/A&gt;‌ wrote a great blog about using&amp;nbsp;HTML2Canvas and the takeScreenshot() method, which might be helpful:&lt;A href="https://community.esri.com/people/RLibed-esristaff/blog/2018/12/20/screenshots-with-the-arcgis-api-for-javascript-html2canvas"&gt;https://community.esri.com/people/RLibed-esristaff/blog/2018/12/20/screenshots-with-the-arcgis-api-for-javascript-html2canvas&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 18:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357170#M33059</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-03-23T18:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export Vector Tiles as screenshot using canvas.todataURL ()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357171#M33060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know screenshots can be tricky when the elements from the web page come from multiple site, so I am not frustrated by the API so far. I just want to make sure I am not missing anything. I am a skilled developer, but by no mean a web development expert. So I am wondering if I am missing something obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main reason I cannot use the take screenshot is that I am working in 2D with Web App Builder. Since the takeScreenshot is a method on the MapView or SceneView in the 4.x APIs only, I won't be able to use this method, since Web App Builder 2D widgets are using our 3.x API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The blog article you mentioned is fantastic, but those examples do work with the 4.x API. Which means they are out of reach for me since the client requirement is that the widget has to work within WAB and 2D application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I correct or am I missing something here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your feedback.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357171#M33060</guid>
      <dc:creator>FabienAncelin</dc:creator>
      <dc:date>2020-03-23T19:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Export Vector Tiles as screenshot using canvas.todataURL ()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357172#M33061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I should have caught that from the initial description. Thank you for reiterating that you are working with the 3x version of the JS API. No, unfortunately, I don't think you're missing anything. I will report back here if I find something else to share. In the meantime, you might have more luck reaching developers who have experienced a similar issue in these other spaces:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/space/2150"&gt;Web AppBuilder for ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/groups/web-app-builder-custom-widgets"&gt;https://community.esri.com/groups/web-app-builder-custom-widgets&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 21:43:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-vector-tiles-as-screenshot-using-canvas/m-p/357172#M33061</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-03-23T21:43:33Z</dc:date>
    </item>
  </channel>
</rss>

