So I'm trying to have users export a JPEG of an area. I'm just in the beginning stages of doing this. I'm stuck on why the features from the MXD are not showing up on the output of the GP tool.
I created a MXD with counties on it. Published the MXD to ArcGIS Server with the counties on it. Registered the layers in the MXD to the Server.
I created a simple Python script that exports the MXD into a JPEG. Works on Local Machine. Published it to ArcGIS Server. When running the GP Service in WAB it only exports the MXD with no layers in it.
What am I missing here? I don't seem to have any features on the exported JPEG. It's just blank.
Python code:
import arcpy, os, zipfile, shutil, urllib2
arcpy.env.overwriteOutput = True
outFolder = arcpy.env.scratchFolder
jpgFile = os.path.join(arcpy.env.scratchFolder, "test" +".jpg")
outPutLocation = arcpy.SetParameterAsText(0, jpgFile )
mxdPath = r"xxxxxxxxxxxxxxx\xxxxxxx\xzxxxxxxx\xxx.mxd"
mxd = arcpy.mapping.MapDocument(mxdPath)
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
arcpy.mapping.ExportToJPEG(mxd, jpgFile)
arcpy.AddMessage(jpgFile)