How do I return multiple layers including a map layer that is a definitionExpression when doing an esriRequest?
If I request a single map layer that is a definitionExpression, the map layer is returned.
{
"id": 1,
"layerDefinition": {
"drawingInfo": drawingInfo,
"source": {
"type": "mapLayer",
"mapLayerId": 1
},
"definitionExpression": "PARID='"+parid+"'"
}
}
If I request two map layers, one with a definitionExpression, no map layers are returned.
"layers": [ { "id": 256,
"layerDefinition": {
"source": {
"type": "mapLayer", "mapLayerId": 256 }
}
},
{
"id": 1,
"layerDefinition": {
"drawingInfo": drawingInfo,
"source": {
"type": "mapLayer",
"mapLayerId": 1
},
"definitionExpression": "PARID='"+parid+"'"
}
}
If I request a single map layer that is not a definitionExpression, the map layer is returned.
Example of map a single map layer shown in black text and white background