[UMN_MAPSERVER-USERS] C# processLegendTemplate
Jean Michel PIERRET
jmp at GEOSYS.COM
Fri Apr 13 00:19:43 PDT 2007
Hi,
Thank you for your assistance, while seeking I found a solution
to circumvent the problem.
int ret;
layerObj lo = null;
classObj co = null;
imageObj io = null;
lo = this._map.getLayerByName(layer);
io = co.createLegendIcon(this._map, lo, 19, 15);
ret = co.drawLegendIcon(this._map, lo, 19, 15, io, 0, 0);
Regards.
<mailto:jmp at geosys.com> Jean-michel PIERRET - Poste 376
Tel : +33 (0)5 62 47 80 76
Mail : <mailto:jmp at geosys.com> jmp at geosys.com
GEOSYS SA
-----Message d'origine-----
De : Tamas Szekeres [mailto:szekerest at gmail.com]
Envoyé : vendredi 13 avril 2007 01:04
À : Jean Michel PIERRET
Cc : MAPSERVER-USERS at lists.umn.edu
Objet : Re: [UMN_MAPSERVER-USERS] C# processLegendTemplate
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.
<mailto:jmp at geosys.com> Jean-michel PIERRET - Poste 376
Tel : +33 (0)5 62 47 80 76
Mail : <mailto:jmp at geosys.com> jmp at geosys.com
GEOSYS SA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070413/56aff96b/attachment.htm>
More information about the MapServer-users
mailing list