KG22

Export Web Map Operational Layers

Discussion created by KG22 on Aug 2, 2012
Latest reply on Aug 3, 2012 by KG22
I'm trying to export a map and have a definition query on one of the visible layers.
As my reference i'm using these two help files from esri:

http://resources.arcgis.com/en/help/rest/apiref/exportwebmap_spec.html
http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000004w8000000

unfortunately, they differ. And i'm not sure why and which is correct.
I see the term "operational layers" used in one example but in another they just refer to "layer".

I'm fairly certain that my request will not work because even though I have defined a definition expression I haven't really said which layer it applies to.

Here is my request:

{
    "mapOptions": {
        "extent": {
            "xmin": -10277673.334899997,
            "ymin": 4527010.491500001,
            "xmax": -10276963.904200003,
            "ymax": 4527654.234599998,
            "spatialReference": {
                "wkid": 102100
            }
        },
        "scale": 13619.999999999998,
        "rotation": 0,
        "spatialReference": {
            "wkid": 102100
        }
    },
    "operationalLayers": [
        {
            "id": null,
            "url": "http://blah.com/ArcGIS/rest/services/MDC/MDC_Edit/MapServer",
            "title": "FGC_Edit",
            "opacity": 0.9,
            "layerDefinition": {
                "definitionExpression": "SHPID='1496E00C03C6494D8A6EDE861FDBA387'"
            },
            "visibleLayers": [
                5
            ]
        }
    ],
    "baseMap": {
        "title": "My Base Map",
        "baseMapLayers": [
            {
                "url": "http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"
            }
        ]
    },
    "exportOptions": {
        "dpi": 96,
        "outputSize": [
            500,
            500
        ]
    },
    "layoutOptions": {
        "titleText": ""
    }
}

Outcomes