Skip to content

Add note about GetLegendGraphic and SLD_VERSION #1068

Open
geographika wants to merge 1 commit intoMapServer:mainfrom
geographika:wms-sld
Open

Add note about GetLegendGraphic and SLD_VERSION #1068
geographika wants to merge 1 commit intoMapServer:mainfrom
geographika:wms-sld

Conversation

@geographika
Copy link
Member

Update the docs to match the implementation in mapwms.cpp.

if (nVersion >= OWS_1_3_0 && sld_version == NULL) {
  msSetErrorWithStatus(MS_WMSERR, MS_HTTP_400_BAD_REQUEST,
                       "Missing required parameter SLD_VERSION",
                       "GetLegendGraphic()");
  return msWMSException(map, nVersion, "MissingParameterValue",
                        wms_exception_format);
}
if (nVersion >= OWS_1_3_0 && strcasecmp(sld_version, "1.1.0") != 0) {
  msSetErrorWithStatus(MS_WMSERR, MS_HTTP_400_BAD_REQUEST,
                       "SLD_VERSION must be 1.1.0", "GetLegendGraphic()");
  return msWMSException(map, nVersion, "InvalidParameterValue",
                        wms_exception_format);
}

@geographika geographika added backport branch-8-0 To backport a pull request to branch-8-0 backport branch-8-2 To backport a pull request to branch-8-2 backport branch-8-4 To backport a pull request to branch-8-4 backport branch-8-6 (live) To backport a pull request to branch-8-6 labels Mar 16, 2026
@geographika geographika removed backport branch-8-0 To backport a pull request to branch-8-0 backport branch-8-2 To backport a pull request to branch-8-2 backport branch-8-4 To backport a pull request to branch-8-4 labels Mar 17, 2026
@geographika
Copy link
Member Author

Although it does seem strange to have to add that parameter, when it can only ever be one value. GetLegendGraphic doesn't seem to be part of the WMS spec so I'm not sure why it couldn't be added in the code automatically if missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport branch-8-6 (live) To backport a pull request to branch-8-6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants