I have three vector layers showing the same information but with a different level of details. In fact, despite the same symbology and attribute table, there is a need to display them at different scales. So I published my 3 layers (lets say layer_A, layer_B and layer_C), created a default style for each one (which are exactly the same except for the Min/MaxScaleDenominator values) and then I integrated them into one layer group (lets say layer_Z) as an Opaque Container. Doing this allow me to use only one layer through my webmapping OL interface but also for the enduser who want to consume the WMS with QGIS.
Everything is working really nice except that in QGIS I've got a legend for each layer in my layergroup ... but they are all the same ! What I'm looking for is creating a single layer (as a layer group), with the 3 layers displaying data on their respective scales (lets say layer_A: 1:50000 to 1:25000 , layer_B: 1:25000 to 1:10000 and layer_C: 1:10000 to 1:100) but using the same symbology (lets say polygons are blue if is_colorized field is True but grey if is_colorized field is False) and only one legend is displayed for this symbology.
I've tried a lot of different tuning (using Earth Observation Tree mode, creating a layer group style, etc.) but nothing works... so if you've got a clue don't hesitate!
If needed, I can join some part of my configuration, of the .sld config, or anything else.
Screenshot:
Stack:
- Geoserver: v2.23 (served through Jetty)
- Java: OpenJDK v17
- QGIS: v3.30
- OS: Windows 10
References: