|
||||
[maplab-users] Question about Legends and LayersDaniel Morissette morissette@dmsolutions.caWed, 03 Jul 2002 14:05:08 -0400
|
Stephen, 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. About the [if ...] tags that remain there if your layer has no name, that's the intended behavior of the HTML legend template so that if you type a value that's never set in an [if...] (or do a typo) then it's not just treated as being false by default. Whether this is a good thing or not is arguable, but we thought that doing things this way would make things easier to debug. I hope that helps, Daniel Stephen Woodbridge wrote: > > Hi all, > > I have a guestion regarding Layers and Legends. > History, I used maplab and gmap factory to create an application > starting point then, the resulting files were modified by hand to > integrate other features - mention this because it is possible that I > broke something. > > I have two Roads layers where the only difference is that they render as > different scale factors with different characteristics. In my HTML > legend I always get 2 Roads lines showing one for each rendering style. > What I would like to get it only one line where the icon changes based > on the scale factor of the applied map since the two layer are mutually > exclusive. > > To generalize this, I would like legend entries that can't be seen > because of the scale factor to not be rendered in the legend. Why should > we confused the user with a lot of extraneous legend entries that are > not rendered because they are out of scale. > > I also tried to make the Roads layer into a group hoping that it would > only show the group name in the legend, but that didn't work either :( > > I have a similar thing happening with ANNOTATION layers. It would be > nice if I could specify what items I WANT in the legend and/or what I > would like EXCLUDED from the legend. > > Also, if I don't NAME the layer I get a bunch of [if ... ] that looks > like code in my legend. > > Any suggestions or ideas? > > -Steve > _______________________________________________ > Maplab-users mailing list > Maplab-users@dmsolutions.ca > http://lists.dmsolutions.ca/mailman/listinfo/maplab-users
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |