JS API 3.29 Print/Export map as an image?

4496
10
Jump to solution
08-06-2019 10:48 AM
Claire_Peterson
Occasional Contributor

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.

0 Kudos
10 Replies
KenBuja
MVP Esteemed Contributor

Since Ben has answered your initial question, you should click the "Mark Correct" button.