I'm building a custom WebMapAsJson to pass to a print service, and for whatever reason, when I add the "layerDefinition" part, I am getting a 404. If I remove the layerDefinition objects, it seems to return the printed image just fine.
"operationalLayers": [
{
...
},
{
"id": "MapService",
"title": "Field Report",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"layers": [
{
"name": "FieldReport", //does this need to be the layer name?
"id": 0,
"layerDefinition": {
"definitionExpression": "ReportID='[GUID]'"
}
},
{
"name": "PhotoInfo",
"id": 1,
"layerDefinition": {
"definitionExpression": "FeatureID ='[GUID]'"
}
}
],
"url": "xxxx" //(public service)
}
]
Do I need to enable something like dynamic map services, or have a certain version of arcgis server for this to work? Trying to follow the instructions here:
ExportWebMap specification—ArcGIS REST API: Services Directory | ArcGIS for Developers