Hi All,
I'm loading up a WMSMapLayer ok. But I can't seem to set the STYLES parameter in GetMap requests.
I need something similar to the following url to be sent with each request. Currently the STYLES parameter is always empty.
http://www.somewmsurl?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&BBOX=-61.7733927083513094657974,83.8673916720936318824897,11.7276043757079584395342,179.999995508414627920502&WIDTH=1001&HEIGHT=765&LAYERS=LayerABC&STYLES=group2&EXCEPTIONS=XML&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE
I've tried adding custom parameters to a IWMSMapLayer3 as below, but that just appends the STYLES parameter to the end of the url with the empty STYLES parameter still existing beforehand, so it doesn't work.
IWMSMapLayer3 wms3 <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>IWMSMapLayer3<SPAN class="punctuation token">)</SPAN>wmsMapLayer<SPAN class="punctuation token">;</SPAN>
IPropertySet customProps <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">PropertySet</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
customProps<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SetProperty</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"STYLES"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"group2"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
wms3<SPAN class="punctuation token">.</SPAN>CustomParameters <SPAN class="operator token">=</SPAN> customProps<SPAN class="punctuation token">;</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I've also tried using the Style property of the IWMSLayer2 interface. This property is of type IWMSLayerStyleDescription. https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#IWMSLayer2_Style.htm
IWMSLayerStyleDescription doesn't seem to have any class that implements it..not that I can find anyway, so I can't instantiate the Style property??
I'd even be willing to intercept the request before it's sent and manually change the url if that's the only option, anyone know of an event or interception point where I could do this though?
Thanks!