[Chameleon] Help - Translation problem - WMS Layers

Normand Savard nsavard at mapgears.com
Thu Aug 10 09:43:34 EDT 2006


Ines wrote:

>Hello, I have a problem with adding WMS Layers.
>
>I have traslated the "file.map" with the variables: LAYER_EN, LAYER_ES,
>LAYER_PT. And I changed some lines and triplicated the file
>legend_template.html. The thanslations look very well!
>
>But my problem now is this: when I add a WMS Layer (home page / buttom
>WMS Layers / Window Map Browser / select layer / buttom "add layer") The
>layer is added to the map, but at the top of the left menu in the home
>page, it don't show me the name of the new added layer, it shows:
>"metadata name=LAYER_EN" (the name of the variable). I don't know how
>traslate the WMS layers, but I don't need to translate the WMS Layers. I
>don't know where are the the files that manage WMS Layers. And I think
>that the application use file legend_layer.html for the WMS Layers.
>
>I need to know if is possible add a layer (home page / buttom WMS Layers
>/ Window Map Browser / select layer / buttom "add layer")and it show me
>at the top of the left menu in the home page, the name of the added
>layer (not the name of the variable).
>
>
>  
>
Ines,

Based on the code found in the file "legend_template_en.html" (or 
"legend_template_pt.html" or "legend_template_es.html") it is not 
supposed to happen.  Basically the code says if there is no "wms_name" 
metadata use "layer_en"metadata as the layer label.  If "wms_name" 
metadata exists, use "wms_title" as the layer label.  I tested the 
sample application and it works as expected.  Do your file look like this?

[leg_layer_html order=ascending opt_flag=15]
  <tr bgcolor="#ffffff">
    <td><input type="radio" name="my_legend" 
onclick="CWCSelectLayer('[leg_layer_name]', true)"[if name=selected 
value=1] CHECKED[/if] ></td>
    <td align="center" width=20><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>
    <td><img src="[leg_icon width=20 height=18]" width="20" height="20"</td>
    [if name=wms_name oper=isnull]
    <td><a href="#" 
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span 
class="label">[metadata name=LAYER_EN]</span></a></td>
  </tr>
    [/if]
    [if name=wms_name oper=isset]
    <td><a href="#" 
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span 
class="label">[metadata name=WMS_TITLE]</span></a></td>
  </tr>
    [/if]
[/leg_layer_html]



Norm


More information about the Chameleon mailing list