Hi, I'm facing issues with getting content dependent legend graphics for wms layers.
I have WMS layer with an assigned SLD style with several property-based rules. When I make GetMap requests all the features are properly styled based on the defined rules. If I make the GetLegndGraphic request I also get properly rendered legend. However, if I add to that GetLegendGraphic request additional query parameter for legend options like "*&legend_options=countMatched:true*" then i get zero (0) values for every rule like there are no features that match that rule. Which is strange because I can clearly see in the GetMap request that it's properly styled. As far as I can see I'm setting correct values for "extent", "crs", "srcwidth", "srcheight" so I'm really not sure where it can go wrong. Also, if I add "hideEmptyRules:true" then I get empty legend which is actually expected if already I have zero values for every rule with "countMatched". Here is example of GetMap request that gives properly styled wms features: http://geoserver.local/geoserver/myworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES&LAYERS=mylayer&exceptions=application%2Fvnd.ogc.se_inimage&CRS=EPSG%3A4326&WIDTH=769&HEIGHT=496&BBOX=44.042435837063046%2C15.364493754777163%2C44.04309992763117%2C15.365523966875822 And here is example of GetLEgendGraphich for same extent that gives all zero values for countMatched: http://geoserver.local/geoserver/myworkspace/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&LAYER=mylayer&legend_options=countMatched:true&CRS=EPSG%3A4326&&SRCWIDTH=796&SRCHEIGHT=496&BBOX=44.042435837063046%2C15.364493754777163%2C44.04309992763117%2C15.365523966875822 I guess I' missing something obvious here so looking forward to hearing some suggestions. Thanks a lot. Best regards, Ivan
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users