[mapserver-users] A Question of Group

Bill Thoen bthoen at gisnet.com
Tue Mar 2 12:07:48 EST 2010

thomas bonfort wrote:
> as the code is right now, classes don't show up in the legend if they
> have no NAME *nor* TITLE
Seeing Bob's comment, I should add that I'm using HTML legends and I'm 
trying to combine *layers* as opposed to classes. Combining CLASSes from 
a LAYER is comparatively easy  (just select everything.)

Taking out the LAYER name doesn't seem to work, and if I remove the 
wms_title and the entire CLASS definition I still get  a row in the 
legend for that layer, no icon, and '[metadata name="wms_title"]' in 
place of the layer title (see red arrow pointing to what I get instead.
Partial legend showing the problem

Here's the piece of my mapfile showing what I commented out and what I 
have in there (The extra baggage is there to support retreiving feature 
attribute data):
      GROUP "BLM Lands"
#     NAME "grp_BLM_ACECs_2009"
         "legend_order" "2"
#        'wms_title' "grp_BLM_ACECs_2009"
#        'wms_group_title' "all_blm_land1"
         'wms_srs' "epsg:2163"
         'gml_include_items' "All"
      TEMPLATE "foo"
      DATA "Agencies/DOI/BLM/BLM_ACEC/BLM_ACECs_2009_2163"
#     CLASS
#        NAME "Areas of Critical Env. Concern"
#        STYLE
#           COLOR 255 247 181
#           COLOR 255 000 000
#        END
#     END
I thought of trying different settings in the opt_flag bit field, but 
there doesn't appear to be a setting for "just do what I want." So I'm 
still looking for ideas, but Plan B is to script a conversion of all 
these various tables into a common structure and then use ogrtindex to 
paste them together. If anyone has an idea that would work and take less 
time I'd sure like to hear from you!

> On Tue, Mar 2, 2010 at 14:02, Bob Basques <bob.b at gritechnologies.com> wrote:
>> James,
>> the Legend entries are keyed off of the NAME paramater in the mapfile, if
>> you don't want a entry in the Legend, comment out the NAME parameter that is
>> displaying the stuff you don't want.
>> bobb
>> On 3/2/2010 6:42 AM, Bill Thoen wrote:
>>> James Card wrote:
>>>> On Mon, 01 Mar 2010 20:48:59 -0800, Bill Thoen <bthoen at gisnet.com> wrote:
>>>>> I've got about about 30 layers that I'd like to display as a single
>>>>> layer, all in the same style, with only one entry in the legend for the
>>>>> group. I've tried using the 'GROUP' command in the mapfile, and while that
>>>>> does put them all under the same heading, each layer still shows as a
>>>>> separate entry in the legend.
>>>> Perhaps a tileindex would work? See "ogrtindex" at
>>>> <http://mapserver.org/optimization/tileindex.html>.
>>> Thanks! That was so close, but that doesn't work unless the data sets have
>>> the same structure. Can you think of anything else short of manually merging
>>> these one by one?
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
Skipped content of type multipart/related

More information about the mapserver-users mailing list