C# processLegendTemplate

Tamas Szekeres szekerest at GMAIL.COM
Thu Apr 12 19:04:08 EDT 2007


Hi,

You might want to specify parameters for leg_group_html, leg_layer_html and
leg_class_html respectively. Like for example:

[leg_group_html opt_flag=12]
<tr>
    <td colspan=3 bgcolor=#cccccc><b>[leg_group_name]</b></td>
</tr>
[/leg_group_html]

[leg_layer_html order_metadata=legend_order opt_flag=5]
<tr>
    <td>
        <input type=checkbox name="map_[leg_layer_name]_status"
       value=1 [if name=layer_status oper=eq value=2]CHECKED[/if]>
     </td>
    <td colspan=2>
        <a href="[metadata name=href]">[metadata name=layer_title]</a>
    </td>
</tr >
[/leg_layer_html]

[leg_class_html opt_flag=14]
<tr>
    <td width=15> </td>
    <td>
        <img src="[leg_icon width=20 height=10]" width=20 height=10>
    </td>
    <td>
        [leg_class_name]
    </td>
</tr>
[/leg_class_html]

Without adding these parameters

msFreeHashTable(groupArgs);
msFreeHashTable(layerArgs);
msFreeHashTable(classArgs);

will fail in generateLegendTemplate (maptemplate.c)

I suggest to file a bug report on this issue with the requirement of
allowing to specify these template elements without adding parameters.

Best regards,

Tamas



2007/4/12, Jean Michel PIERRET <jmp at geosys.com>:
>
>  Hi,
>
>
>
> How I can use processLegendTemplate in c#
>
>
>
> My source :
>
>
>
>             map = new mapobj(@"C:\Fichier.map");
>
>
>
>             ...
>
>
>
>             string str = null;
>
>             string[] names = null, values = null;
>
>
>
>             names = new string[] {"map"};
>
>             values = new string[] { @"C:\Fichier.map" };
>
>
>
>             str = map.processLegendTemplate(names, values, names.Length);
>
>
>
>             ...
>
>
>
> Error :
>
>
>
> {"msFreeHashItems(): Hash table error. Can't free NULL
> table;msFreeHashItems(): Hash table error. Can't free NULL
> table;msFreeHashItems(): Hash table error. Can't free NULL table"}
>
>
>
>
>
> Thanks for your help.
>
>
>
> *Jean-michel PIERRET <jmp at geosys.com> - Poste  376*
>
> *Tel : +33 (0)5 62 47 80 76*
> *Mail* : jmp at geosys.com
> *GEOSYS SA*
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070413/fbb33199/attachment.html


More information about the mapserver-users mailing list