[mapserver-users] How Can I Get More Control over getLegendGraphic?

Bill Thoen bthoen at gisnet.com
Mon Nov 30 13:59:10 EST 2009


I'm trying to build a custom legend with MapServer (and OpenLayers plus 
some custom JS and PHP) and I'm using the getLegendGraphic request to 
get the graphic pieces for the legend. However, I've got some layers 
with data from 2003, 2005 and 2009 (3 separate layers) that I want to 
represent on the legend with their common style and one label  (e.g. 
Forest Lands instead of 3 icons labeled "Forest Lands 2003", "Forest 
Lands 2005", "Forest Lands 2009").

I tried making a group layer, but getLegendGraphic() didn't like this 
and it returned null.
Is there a way I can specify both the style icon and the label? Or is 
there some other way to do this?

Help would be appreciated (as it always is).

Thanks,

-- 
Bill Thoen
GISnet -  www.gisnet.com
1401 Walnut St., Suite C
Boulder, CO 80302
303-786-9961 tel
303-443-4856 fax



More information about the mapserver-users mailing list