ervivekraj

How to use SLD_BODY in WMS Layer

Discussion created by ervivekraj on Dec 17, 2013
Latest reply on Dec 17, 2013 by jeff.pace
Hello,

I am trying to use SLD_BODY in WMS layer but if i pass the URL like this "http://sampleserver1.arcgisonline.com/arcgis/services/specialty/esri_statescitiesrivers_usa/mapserver/wmsserver?version=1.3.0&request=getmap&crs=crs:84&bbox=-178.217598,18.924782,-66.969271,71.406235&width=765&height=360&layers=0&styles=multiple_rules&exceptions=application/vnd.ogc.se_xml&format=image/png&bgcolor=0xffffff&transparent=true&sld=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_multiple_rules.xml"
then it is working fine but when I use SLD_BODY like this "http://sampleserver1.arcgisonline.com/arcgis/services/specialty/esri_statescitiesrivers_usa/mapserver/wmsserver?version=1.3.0&request=getmap&crs=crs:84&bbox=-178.217598,18.924782,-66.969271,71.406235&width=765&height=360&layers=0&styles=multiple_rules&exceptions=application/vnd.ogc.se_xml&format=image/png&bgcolor=0xffffff&transparent=true&SLD_BODY=%3Csld%3AStyledLayerDescriptor%20xmlns%3Asld%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22%20version%3D%221.0.0%22%20xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%20http%3A%2F%2Fschemas.opengis.net%2Fsld%2F1.0.0%2FStyledLayerDescriptor.xsd%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%3Csld%3ANamedLayer%3E%3Csld%3AName%3Eblockgroups%3C%2Fsld%3AName%3E%3Csld%3ANamedStyle%3E%3Csld%3AName%2F%3E%3C%2Fsld%3ANamedStyle%3E%3Csld%3AUserStyle%3E%3Csld%3AName%3Estyle_sld_body%3C%2Fsld%3AName%3E%3Csld%3AFeatureTypeStyle%3E%3Csld%3ARule%3E%3Csld%3AName%3E0%20-%20784%3C%2Fsld%3AName%3E%3Csld%3ATitle%3E0%20-%20784%3C%2Fsld%3ATitle%3E%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3APropertyIsBetween%3E%3Cogc%3APropertyName%3EPOP1990%3C%2Fogc%3APropertyName%3E%3Cogc%3ALowerBoundary%3E%3Cogc%3ALiteral%3E0%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3ALowerBoundary%3E%3Cogc%3AUpperBoundary%3E%3Cogc%3ALiteral%3E784%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3AUpperBoundary%3E%3C%2Fogc%3APropertyIsBetween%3E%3C%2Fogc%3AFilter%3E%3Csld%3APolygonSymbolizer%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23FFFF80%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22fill-opacity%22%3E1%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3Csld%3AStroke%3E%3Csld%3ACssParameter%20name%3D%22stroke%22%3E%23FF3300%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-opacity%22%3E1%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-width%22%3E1%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-linejoin%22%3Eround%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-linecap%22%3Eround%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AStroke%3E%3C%2Fsld%3APolygonSymbolizer%3E%3C%2Fsld%3ARule%3E%3Csld%3ARule%3E%3Csld%3AName%3E785%20-%201571%3C%2Fsld%3AName%3E%3Csld%3ATitle%3E785%20-%201571%3C%2Fsld%3ATitle%3E%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3APropertyIsBetween%3E%3Cogc%3APropertyName%3EPOP1990%3C%2Fogc%3APropertyName%3E%3Cogc%3ALowerBoundary%3E%3Cogc%3ALiteral%3E785%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3ALowerBoundary%3E%3Cogc%3AUpperBoundary%3E%3Cogc%3ALiteral%3E1571%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3AUpperBoundary%3E%3C%2Fogc%3APropertyIsBetween%3E%3C%2Fogc%3AFilter%3E%3Csld%3APolygonSymbolizer%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23F7C348%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22fill-opacity%22%3E1%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3Csld%3AStroke%3E%3Csld%3ACssParameter%20name%3D%22stroke%22%3E%230033FF%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-opacity%22%3E1%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-width%22%3E1%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-linejoin%22%3Eround%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-linecap%22%3Eround%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AStroke%3E%3C%2Fsld%3APolygonSymbolizer%3E%3C%2Fsld%3ARule%3E%3Csld%3ARule%3E%3Csld%3AName%3E1572%20-%204737%3C%2Fsld%3AName%3E%3Csld%3ATitle%3E1572%20-%204737%3C%2Fsld%3ATitle%3E%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3APropertyIsBetween%3E%3Cogc%3APropertyName%3EPOP1990%3C%2Fogc%3APropertyName%3E%3Cogc%3ALowerBoundary%3E%3Cogc%3ALiteral%3E1572%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3ALowerBoundary%3E%3Cogc%3AUpperBoundary%3E%3Cogc%3ALiteral%3E4737%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3AUpperBoundary%3E%3C%2Fogc%3APropertyIsBetween%3E%3C%2Fogc%3AFilter%3E%3Csld%3APolygonSymbolizer%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23C46D1B%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22fill-opacity%22%3E1%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3Csld%3AStroke%3E%3Csld%3ACssParameter%20name%3D%22stroke%22%3E%2333FF00%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-opacity%22%3E1%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-width%22%3E1%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-linejoin%22%3Eround%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22stroke-linecap%22%3Eround%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AStroke%3E%3C%2Fsld%3APolygonSymbolizer%3E%3C%2Fsld%3ARule%3E%3C%2Fsld%3AFeatureTypeStyle%3E%3C%2Fsld%3AUserStyle%3E%3C%2Fsld%3ANamedLayer%3E%3C%2Fsld%3AStyledLayerDescriptor%3E&BBOX=-122.64942090625,37.6087920625,-122.25391309375,37.8724639375&WIDTH=1152&HEIGHT=768

I only change the Bold and italic part but i am not able to see the changes in layer.

Many thanks if I get some clue how to implement these functionality in ArcGIS javascript application
"

Outcomes