GetLegendGraphics option to return feature counts at the end of rule labels fails, if no BBOX is send with stand-alone GetLegendgraphics request

Description

In a GetLegendGraphic request BBOX parameters are optional. If the new legend option (GEOS-8114: Add a GetLegendGraphics option to return feature counts at the end of rule labelsClosed) legend_options=countMatched is used in a stand-alone GetLegendGraphic request the BBOX becomes mandatory. If BBOX is missing the GetLegendGraphic request fails with "GetMap requests must include a BBOX parameter".

While this breaks WMS standard, I propose to use the layers bbox as default if BBOX is not available in the GetLegendGraphic request. This will make this feature more robust and offers the possibility to show layer-overall counts in a legend graphic (not only depending on the recent requested map extend) alternatively by not sending a bbox param.

See for examples: http://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/index.html#content-dependent-legends

Environment

None

Activity

Marco Lechner - German Office for Radiation Protection 
May 5, 2017 at 6:54 AM

Andrea Aime 
May 4, 2017 at 10:04 AM

The bbox by itself does little, the parameters that become mandatory are also the srs, width and height, otherwise the getmap run internally has nothing to run on. It would be possible to adopt the layer native ones for both bbox and srs/crs I assume, but what to do with srcwidth/srcheight? Do a guess like the map preview does for example?

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Components

Priority

Created May 4, 2017 at 8:59 AM
Updated November 15, 2021 at 10:08 AM
Resolved June 8, 2017 at 3:33 PM