This is a bit strange. If I load a WMSLayer on the map without specifying any layer, I see how it starts to recover all the legends of the server, one by one. On the contrary, if I specify which layers I need (setting field Layer) I see that it adds the layer to the map, but does not make the request to read the legend
If Layers object is empty:
- Do a GetCapabilities request
- Do one GetLegendGraphic request per layer
- Do a GetMap request
But if I set Layers object
- Do a GetCapabilities request
- Do a GetMap request
In both cases ShowLegend is true
Thanks