mapserver/mapserver — pull request #4782 by tbonfort (2013-10-05 11:22:22+00:00)
Title: The GetLegendGraphics request generate a white image if name is empty

Using the last trunk:
if set CLASS name = "" the image is empty and white.
Instead it is correctly create if the name is valorized.

As example:

this will get an empty getlegendgraphics image:

LAYER
NAME "test1"
TYPE LINE
STATUS OFF
EXTENT 1660351.00 4458445.22 1866743.13 4960849.91
FEATURE
WKT "LINESTRING(1662120.546188 4858603.677291, 1662738.746295 4858875.082216, 1663854.522097 4858618.755342, 1664779.309249 4858638.85941)"
END #FEATURE
METADATA
"wms_title" "Test"
"ows_enable_request" "*"
END
LABELCACHE on
CLASS
name ""
STYLE
COLOR 200 0 0
OUTLINECOLOR 0 255 0
END
END #CLASS
END

Instead this other will generate a correct getlegendgraphic image.

LAYER
NAME "test1"
TYPE LINE
STATUS OFF
EXTENT 1660351.00 4458445.22 1866743.13 4960849.91
FEATURE
WKT "LINESTRING(1662120.546188 4858603.677291, 1662738.746295 4858875.082216, 1663854.522097 4858618.755342, 1664779.309249 4858638.85941)"
END #FEATURE
METADATA
"wms_title" "Test"
"ows_enable_request" "*"
END
LABELCACHE on
CLASS
name "aaaa"
STYLE
COLOR 200 0 0
OUTLINECOLOR 0 255 0
END
END #CLASS
END