Hello
I have an asynchronous geoprocessing service written in python that takes a layer from a mapservice and generates a jpeg image out of it.
To achieve this i am using ExportToJPEG
I need said geoprocessing service to return the image as a job result. How can i achieve that?
thank you
import arcpy
q ={
"mapOptions": {
"extent": {
"xmin" : -79.50,
"ymin" : -4.60,
"xmax" : -66.50,
"ymax" : 12.8,
"spatialReference" : {
"wkid" : 4686
}
}
},
"operationalLayers": [{ "url":"....."}]
}
result = arcpy.mapping.ConvertWebMapToMapDocument(q);
arcpy.mapping.ExportToJPEG(result.mapDocument, path_to_image)
del result