Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
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.
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
Unassigned
Unassigned
Reporter
Marco Lechner - German Office for Radiation Protection
Marco Lechner - German Office for Radiation Protection
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