aramsdell

How to Override STYLES= in WMS getMapUrl to specify a style?

Discussion created by aramsdell on May 16, 2013
Latest reply on May 17, 2013 by DSwingley-esristaff
Through the js api http://developers.arcgis.com/en/javascript/jsapi/wmslayer.html, I see no way to override the getMapUrl to inject a STYLES parameter value in the getMapUrl. We added it to the beginning of the string and it worked for awhile to bring back the correct style but something changed on the wms server and now it returns an error that STYLES cannot be defined twice.

http://lcat.usgs.gov/geoserver/cbntn/wms?STYLES=cbntn_indicators_tsscombo&SERVICE=WMS&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=TRUE&STYLES=&VERSION=1.3.0&LAYERS=cbntn:cbntn_indicators&WIDTH=800&HEIGHT=500&CRS=EPSG:102100&BBOX=-9549994.753131917,4281205.088846833,-7593206.829031925,5504197.541409328

We were able to get around this by forcing the request through a proxy and changing it there but is there a better way?

Outcomes