I am trying to use ESRI vendor specific WMS parameter "layerDefs", as described here:
However, I have problem getting it to work since syntax as in the example breaks the service (server responds with "Your browser sent a request that this server could not understand"). This should be working but it doesn't:
I know that this service supports layerDefs because it works for map service:
2) with layerDefs (bottom part is excluded as it is outside Alaska):
Note the bottom part of the pic disappears (ie. is filtered out)
In map service it is layer 3 but WMS has it listed as layer 53 (don't ask, it's ESRI!)
So, WMS url without layerDefs is as follows:
But server 'doesn't understand' the request when layerDefs parameter is included.
Do you know what is the correct syntax?
It appears there is no way to include layerDefs parameter in ESRI WMS service. It simply doesn't work. I asked around, searched the internet and tested all possible combination I could think of. Pity, such a large company stumbles on basic functionality of their products... or doing it deliberately? Then there is lack of documentation and basic support (questions on ESRI forums remain unanswered for years... and this post had only a handful of views so far!)
Map service option works with layerDefs (as described in my question) so that's what I am going with for now. Unfortunately, it requires extra coding. And I am not touching any of ESRI concoctions ever again...