[Chameleon] ungrouped layers and legendtemplate
Ken-ichi Ueda
kenichi.ueda at gmail.com
Thu Jun 2 13:37:22 EDT 2005
Thanks, guys. I ended up using a combination of your suggestions.
Paul, what is Bart's recent fix you speak of?
Thanks again.
-Ken-ichi
On 6/1/05, Paul Spencer <pspencer at dmsolutions.ca> wrote:
> Ken-ichi
>
> if you are using groups and group_html in your legend template, layers
> that do not have groups are not included by the template processor
>
> One solution is to get Bart's recent fix that leaves layers with STATUS
> DEFAULT alone (i.e. always on) and use it on ungrouped layers
>
> Another solution is to put all the ungrouped layers into a special group
> and use [if] statements to not show that group (but instead put <input
> type="hidden" name="legendgrouplayers[]" value="[leg_group_name">) to
> ensure that the layers stay on but not visible
>
> Cheers
>
> Paul
>
> Jacob Delfos wrote:
> > Ken-Ichi,
> >
> > You can adjust your legend template to look for a metadata-value that
> > you made up, and then it can use boolean logic to determine whether or
> > not to show the layer in the legend. Have a look at
> > http://lists.maptools.org/pipermail/chameleon/2004-October/001526.html
> >
> > In short: if a layer has the same name as another layer, they will turn
> > on and off at the same time, even if only one layer shows in the legend.
> > That way you can emulate groups, while also having control of individual
> > layers. In your case, I would add a layer to your mapfile, with "STATUS
> > DEFAULT", and then use a metadata entry to prevent it from showing in
> > the legend.
> >
> > regards,
> >
> > Jacob
> >
> >
> > -----Original Message-----
> > From: chameleon-bounces at lists.maptools.org
> > <mailto:chameleon-bounces at lists.maptools.org>
> > [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Ken-ichi
> > Sent: 2 June 2005 06:03
> > To: chameleon at lists.maptools.org <mailto:chameleon at lists.maptools.org>
> > Subject: [Chameleon] ungrouped layers and legendtemplate
> >
> > Hi all. I feel like this is a problem I have solved in the past but I
> > just can't seem to figure it out: my layers in a map file are organized
> > into GROUPs, and I have an HTML legend template that works fine with the
> > LegendTemplate widget. However, when I have a layer that isn't a part
> > of a group, it disappears whenever the map is updated (update, zoom,
> > pan, whatever). I was hoping to use ungrouping layers as a way of
> > hiding them from the legend while still displaying them on the map. Is
> > Chameleon actually looking to some list of layers generated by
> > LegendTemplate when it draws an updated map? Is there a better way to
> > effectively "hide" some layers from the legend in Chameleon?
> >
> > Thanks in advance.
> >
> > -Ken-ichi
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org <mailto:Chameleon at lists.maptools.org>
> > http://lists.maptools.org/mailman/listinfo/chameleon
> >
> >
> > JACOB DELFOS
> > SPATIAL INFORMATION ANALYST
> > Maunsell Australia Pty Ltd
> > 629 Newcastle Street, WA 6007
> > PO Box 81, WA 6902
> > Leederville
> > Western Australia
> > ABN 20 093 846 925
> >
> > Tel + 61 8 9281 6185
> > Fax + 61 8 9281 6297
> > jacob.delfos at maunsell.com <mailto:jacob.delfos at maunsell.com>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/chameleon
>
> --
> +-----------------------------------------------------------------+
> |Paul Spencer pspencer at dmsolutions.ca |
> +-----------------------------------------------------------------+
> |Applications & Software Development |
> |DM Solutions Group Inc http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
More information about the Chameleon
mailing list