Steve - thanks a lot. That helps a tonne. Even just having this as part of the list archives will be useful.
 
Thanks again for the dbox interface. That is *incredibly* useful.
 
Chip

>>> Steve Lime <[EMAIL PROTECTED]> 6/2/2006 12:26 PM >>>
At this point the documentation is pretty sparce, but the demo shows all the options
at the moment. We developed that capability for a specific project so there will likely
need to be extensions.

The metadata serves 3 primary functions:

1) it allows the creation of what we call metagroups to collect similarly themed layers or
groups

In the demo the following metadata does that:

  dlegend_metagroups "foreground,background"
  dlegend_foreground_layers_and_groups "pls,lakes,dlgstln2,cities,roads"
  dlegend_background_layers_and_groups "drgs,lulc_90cenim3"

The first line tells the parser what groups there are (and what order to render themin the
legend) and the next two lines define membership.

2) is allows the naming of elements that can't be named with normal MapServer map
elements. Obviously metagroups since they are not MapServer constructs cannot be
named. Nor can MapServer groups or layers with more than one named class. In those
cases we name those elements with metadata:

  dlegend_foreground_name "Foreground Layers:"
  dlegend_background_name "Background Layers:"
  dlegend_lulc_90cenim3_name "Landuse/Landcover"
  dlegend_pls_name "Public Land Survey"
  dlegend_roads_name "Roads"

3) we can alter the legend control element type used for a metagroup, either a checkbox
or a radio button. Yahoo actually mimics that behavior with DHTML and css but the effect
is the same as using a form.

  dlegend_background_element "radio"

That's really all there is to it. All other information such as class names, icons and scale limits
are picked up from the regular mapfile structures.

We have immediate needs to make a couple of extensions such as allowing nested
metagroups and setting the default status (open/closed) of a metagroup.

Let me know if this helps and/or if you need more detail. We can post this then as documentation
for the MapScript piece of dlegend...

Steve

Outgoing messages, along with any attachments, are scanned for viruses prior to sending.


NOTICE-- This email may contain confidential and privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and delete all copies.

Reply via email to