Select to view content in your preferred language

WMS with SLD, how to implement? (What does the styleName attribute do?)

1913
1
02-26-2013 04:22 AM
JasonCantrell
Deactivated User
I'm currently trying to get a WMSLayer to display a map layer with a style applied to it, but I'm having trouble figuring out how to properly implement it. I've defined the SLD within the source URL for the WMSLayer component, but I can't seem to figure out how to define the name of the style (the "STYLES=" portion of the WMS url). Using Firebug, I can see that the WMSLayer component adds "STYLES=" to the generated URL but I can't seem to find a way to populate that attribute. I see that there is a "styleName" attribute of the WMSLayer component, but assigning something to that attribute doesn't seem to actually set the STYLES parameter within the generated map URL. If "styleName" doesn't set the STYLES parameter, then what does it do?
Tags (2)
0 Kudos
1 Reply
YannCabon
Esri Contributor
Hi,

To send the STYLES parameter in the GetMap request, add it to the url of your service like that:

<esri:WMSLayer url="http://wms.jpl.nasa.gov/wms.cgi?STYLES=Mar">


example not working but this is the way you have to take.
0 Kudos