[Chameleon] add url to legend icon in legend template file

Julien-Samuel Lacroix jlacroix at mapgears.com
Thu Mar 23 09:57:07 EST 2006


Hi,
The keyimage will be used as your legend icon. So the [leg_icon...] tag 
in your legend template really is your keyimage. So just use something 
like this:
<td><a href="[leg_icon width=<real_width> height=<real_height>]"><img 
src="[leg_icon width=20 height=18]" width="20" height="18"></a></td>

In my example, replace the <real_...> by the real width and height.

Julien

He, Matt Yubin wrote:
> Hi list:
> 
>  
> 
>             In legend_template.html file, there is a line of code for 
> display legend icon:   
> 
> <td><img src="[leg_icon width=20 height=18]" width="20" height="20"></td>
> 
>  
> 
>  
> 
>       In my map file, I defined my legend image as this:
> 
> class
> 
>    keyimage “/legend_images/mylegend.jpg”
> 
> end
> 
>  
> 
>       I am trying to add a URL to the legend icon in 
> legend_template.html file, so that when user click the legend icon, it 
> shows the real image defined in “KEYIMAGE”, e.g.:
> 
> <td><a href="[XXXXX]"><img src="[leg_icon width=20 height=18]" 
> width="20" height="20"></a></td>
> 
>  
> 
> Does anyone know what I should put in (to replace XXXXX) to refer to the 
> keyimage?
> 
>  
> 
>  
> 
> Thanks.
> 
>  
> 
>  
> 
> Matt
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon mailing list