I have a javascript app without a map. I need a png from export web map service and one of the features(geometry type polygon) should be selected. My code look like this:
var dynamicLayers = '[{"source":{"mapLayerId":3,"selectionObjectIds":['+ attrs.OBJECTID +'],"selectionSymbol":{"symbol":{"type":"esriSFS","style":"esriSFSSolid","color":[255,0,0,255]}}}}]';
var JsonObj = {
"bbox": JSON.stringify(result.features[0].geometry.getExtent()/*.expand(2) */),
"format":"png",
"transparent": "false",
"size":"800,600",
"f": "pjson",
"mapScale": "1000",
"dynamicLayers":dynamicLayer
}
$.get(getConfigValuByName("exportMapImage"), JsonObj, function (data) {
$("#loading").show();
var obj = JSON.parse(data);
/*....*/
$("#loading").hide();
});