AnsweredAssumed Answered

JS API 3.29 Print/Export map as an image?

Question asked by luckachi on Aug 6, 2019
Latest reply on Aug 7, 2019 by kenbuja

I have a map that was created using "Selecting Features Using URL Parameters"  where an ID is passed in the URL and the map creates a graphic of the selected feature, zooms to it and hides everything else in the layer (so I can only see the feature that the object ID matches the ID in the URL (along with the basemap and another feature layer). It is a ArcGIS API for JavaScript map built with 3.29 and the map is displayed in a dijit Border Container / Content Pane.

 

Is there any way to take the final rendered map an convert it into an image to be used elsewhere, say in a PDF along with attributes from that selected feature? The layer that is getting queried is behind credentials so when the page first loads it asks for a log in and then the map renders as it should.

 

I have tried the screenshot method using html2canvas, canvas.toBlob, Filesaver but the screenshot does not contain anything other than the tiled basemap.

 

Any help would be greatly appreciated. Thank you.

Outcomes