MapTools.org

[maplab-users] Question about Legends and Layers

Stephen Woodbridge woodbri@swoodbridge.com
Wed, 03 Jul 2002 15:28:28 -0400
Daniel Morissette wrote:

> I can't tell about the way GMapFactory apps deal with the legend
> specifically (if there are any exceptions to be aware of?), but I think
> you should be able to control layer visibility based on scale via the
> legend template.
> 
> See the HTML legend docs for the full details:
>  http://mapserver.gis.umn.edu/doc36/html-legend-howto.html
> 
> Look at the opt_flag value in the [leg_layer_html] tag (or
> leg_group_html?) and unset bit '1' in the value (e.g. if it's
> opt_flag=15 then set opt_flag=14).. this will restore the default
> behavior which is to hide layers that are currently out of scale.

Oh, this works great - very cool!

On more semi related question. As I zoom in on the map and a layer
becomes "IN SCALE" it shows on the legend but it is always selected OFF!
How do I get it to default to ON, it is set to STATUS ON in the map
file, and I tried to set it to STATUS DEFAULT but it is not selected ON
when you zoom into scale. 

You have to select if on and refresh the map which is a pain if you have
a lot of layers that do this.

-Steve


This archive was generated by Pipermail.