Bill,


Well, first off, I have no idea how the Legend entry for grp_BLM_WSAa_2009 is being created with nothing whatsoever in the Mapfile (other than comments) having that as a value.  Could you be experiencing a Caching problem somewhere?  Another possibility, is that the HTML legend parser is not recognizing the Comments in the Mapfile, you could test this easily enough by removing the lines entirely.


I think a (more) failsafe way of approaching this is to build a complete set of dummy layer definitions for the Legends.  One thing that seems to be a problem, is the separation of WMS and normal legend HTML/Chip generation, maybe you need two separate mapfiles, one for the HTML legends and one for the mapping, seems cumbersome to go this route though.


As a matter of discussion, I went into using HTML legends early on, and ran into similar problems as these, and after a few months I ended up abandoning the use of them.  Also, I now use GeoMoose as my preferred client side interface, which deals with each layer separately, which is very conducive to building out layer specific legends.  The PROs of using HTML legends were canceled out essentially, by the organizational structure of how GeoMoose requests it's resources.


bobb




>>> Bill Thoen <[email protected]> wrote:

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):
   LAYER
      GROUP "BLM Lands"
#     NAME "grp_BLM_ACECs_2009"
      METADATA
         "legend_order" "2"
#        'wms_title' "grp_BLM_ACECs_2009"
#        'wms_group_title' "all_blm_land1"
         'wms_srs' "epsg:2163"
         'gml_include_items' "All"
      END
      TYPE POLYGON
      STATUS ON
      TEMPLATE "foo"
      DUMP TRUE
      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
      PROJECTION
         "init=epsg:2163"
      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 <[email protected]> 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 <[email protected]> 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

[email protected]

http://lists.osgeo.org/mailman/listinfo/mapserver-users


    

_______________________________________________

mapserver-users mailing list

[email protected]

http://lists.osgeo.org/mailman/listinfo/mapserver-users


  




_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to