3

I want to create a color legend on mapserver. It is working but now I have to group several classes together like a heading with a group of color in it and so on. I have 10 such groups of classes.

I tried using the concept of classgroup and group in a class, but now it only returns the last classgroup with no label/heading.

I want an ordered hierarchy showing group and contained classes.

Please, it would be really helpful if somebody could help me as to how to display all the groups of classes.

2

Since Mapserver also supports HTML legends, you could try that. It should be flexible enough to allow grouping and nesting as you require.

This is the link to the documentation:

http://mapserver.org/output/html_legend.html

In particular make sure you check example #3 which does something similar to what you require (albei less complex):

http://demo.mapserver.org/cgi-bin/mapserv?map=%2Fosgeo%2Fmapserver%2Fitasca_legend%2Fmap%2Fitasca3.map&layers=all&zoomsize=2&zoomdir=1&map_size=600+400&map_web=

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.