|
||||
[Chameleon] Legend template helpPaul Spencer spencer@dmsolutions.caMon, 05 Apr 2004 07:33:40 -0500
|
Darren, display of legend icons for WMS layers is currently not handled very well in MapServer and consequently Chameleon has problems too. The WMS spec does provide GetLegendGraphic but this is only partially supported in MapServer (as a WMS server) and I am not sure what the status is as a WMS client (which is what we need). In some cases, Chameleon is able to get a legend graphic but I believe that the legend template (which is just a standard mapserver legend template from cgi mode) does not support it yet. This is an area of concern for many Chameleon users and we will hopefully be looking to address this in the Spring. No specific timeline is available yet, however. The query widget *should* work with non-WMS layers but I think that in version 1.0 (because it was designed to work with only Context files and WMS layers) the capability to query local layers was disabled or not quite completed. It does work in version 1.99 Cheers, Paul Darren.Cope@statcan.ca wrote: > Hi all, > > I am having some issues with my legend. I am using the Chameleon 1.0 > (CWC2) application. I have created an html legend (see below) which > displays non-WMS layers as I would like (with their correct legend > icons). Unfortunately, the "Query" widget does not query non-WMS > layers, so I would like to use only WMS layers in my application, and > would like to duplicate my current legend with WMS layers only, and then > remove all of the layers in my template map file (at this point, I am > displaying all layers from both a WMS and from my map template file. > This, obviously, is not a good solution to the problem, and causes > layers to show up twice in the legend.) I think the main problem is > that I cannot display the legend icons for WMS layers--does anyone know > how to do this properly? If I could display legend icons for WMS > layers, I would be able to use only layers from my WMS server, and this > would fix all of my problems. > > Any advice is much appreciated! Here is my html legend template: > > > > > [leg_layer_html opt_flag=15] > > <tr bgcolor="#FFFFFF" width=100%"> > <td align="center"><input type="checkbox" name="legendlayername[]" > value="[leg_layer_name]" > [if name=layer_status oper=eq value=1]CHECKED[/if] > [if name=layer_status oper=eq value=2]CHECKED[/if]></td> > [if name=wms_name oper=isnull] > <td> > <a href="#" > onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font > face="Arial, Helvetica, sans-serif" > size="3">[leg_layer_name]</font></a></td> > > </tr> > [/if] > [if name=wms_name oper=isset] > <td><img src="[leg_icon]"><a href="#" > onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font > face="Arial, Helvetica, sans-serif" size="2">[metadata > name=WMS_TITLE]</font></a></td> > > </tr> > [/if] > > [/leg_layer_html] > > [leg_class_html opt_flag=15] > <tr><td colspan="2" align="right"> > <font face="Arial, Helvetica, sans-serif" size="1"> > [leg_class_name] > </font> > <IMG SRC="[leg_icon]"> > </td></tr> > [/leg_class_html] > > > Thanks in advance for any suggestions! > > *Darren Cope* > Statistics Canada/Statistique Canada > Geography Division/Division de la géographie > Jean Talon 3D5 > Ottawa, Canada > (613) 951-6461 > -- ----------------------------------------------------------------- |Paul Spencer pspencer@dmsolutions.ca | |-----------------------------------------------------------------| |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| -----------------------------------------------------------------
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |