Select to view content in your preferred language

Export Web Map Task for WmsLayer using the Styles Paramater

1986
0
12-14-2012 05:35 AM
TerenceDwyer
Deactivated User
I'm currently trying to use the new Execute Web Map Task to print out a WmsLayer that uses an SLD file for filtering and styling.  Because I was unable to find a way to set the Style paramater using the WmsLayer class I created a Proxy that would insert the Styles Param before calling the Execute Command.  From the look of the Json packet this should work, but I'm still not seeing the SLD file being used.  Below is the Json Packet, the Image is returned but without the proper styling/filtering.  I've also included the SLD File as an Attachment (Remove the .txt)

{
  "operationalLayers": [
    {
      "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
      "title": "BaseLayer",
      "opacity": 1,
      "id": "BaseLayer",
      "visibility": true
    },
    {
      "opacity": 1,
      "visibility": true,
      "type": "wms",
      "url": "http://snlmap03/ArcGIS/services/SNLMaps/US_Bank_COS/MapServer/WMSServer?SLD=http://snlmap03.snl.int/...",
      "version": "1.3.0",
      "transparentBackground": true,
      "layers": [
        "5"
      ],
      "visibleLayers": [
        "5"
      ],
      "styles": [
        "5"
      ]
    }
  ],
  "mapOptions": {
    "extent": {
      "xmin": -20037508.3427892,
      "ymin": -12719693.2109605,
      "xmax": 20037508.3427892,
      "ymax": 12719693.2109605,
      "spatialReference": {
        "wkid": 102100
      }
    },
    "scale": 100573922.352907,
    "rotation": 0
  },
  "exportOptions": {
    "dpi": 96,
    "outputSize": [
      1506,
      956
    ]
  },
  "layoutOptions": {
    "titleText": "SNL Maps",
    "copyrightText": "SNL Maps 2012",
    "authorText": "SNL",
    "legendOptions": {
      "operationalLayers": [
        {
          "id": "BaseLayer"
        },
        {}
      ]
    }
  }
}
0 Kudos
0 Replies