Hello,
I'm trying to generate a map image with points/lines and layers similar to what you would get client side with takeScreenshot, but on server side. I tried using wkhtmltoimage which renders html into a image, but every time I run into the issue of the map image being blank. When turning on javascript debug there's a reference error "Warning: undefined:0 ReferenceError: Can't find variable: Map" with every 4.x sample live view which in the browser displays as expected.
My Question:
Wkhtmltoimage is known to have problems with javascript but I was wondering if anyone else has used it and seen correct results, or if there is an alternative for generating a map image server side? Ideally I would be able to provide extent, basemap, graphics, and information for the different kinds of layers being used.
Thanks
Mitchell,
I have no experience with wkhtmltoimage but that you are wanting to do is exactly what the print task on ArcGIS server is designed to do.
https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-PrintTask.html
https://developers.arcgis.com/javascript/3/jsapi/printtask-amd.html