AnsweredAssumed Answered

Get the WebMap from Javascript API esri/map

Question asked by mtdave on Aug 18, 2015
Latest reply on Jul 27, 2018 by Cook_County_GIS

Hi, I need a good method to get the current WebMap object from the Javascript API map. I need to pass the WebMap as JSON to a GP task that will use the arcpy.ExportWebMap_server() tool to create a map image on the server. I was using a hack method I found using the Javascript API PrintTask that was working great until I switched to the latest version of the API (3.14) which I need for other reasons.


var pt = new PrintTask();

var webmap_json = pt._getPrintDefinition(;


The _getPrintDefinition() is an internal method and it appears it no longer works in the latest version of the JS API (3.14). Is there another way to get the WebMap? A method like would be nice!