<br><font size=2 face="sans-serif">I need a dynamic legend since I use
variable substitution in the FILTER. In the interface the user can change
parameters, years per example. So the SIZE of the circles and the class
titles will change.</font>
<br>
<br><font size=2 face="sans-serif">Here is what I did to manage this</font>
<br><font size=2 face="sans-serif">In the Mapfile I use one class for getmap
and 3 classes for the legend</font>
<br><font size=2 face="sans-serif">FILTER (annee = '%annee%' AND contaminant
= '%contaminant%' )</font>
<br><font size=2 face="sans-serif">CLASS</font>
<br><font size=2 face="sans-serif">        NAME
"Concentration maximale horaire"</font>
<br><font size=2 face="sans-serif">        STYLE</font>
<br><font size=2 face="sans-serif">         
      SYMBOL 'CIRCLE'</font>
<br><font size=2 face="sans-serif">         
      SIZE [rayonmax]</font>
<br><font size=2 face="sans-serif">         
      COLOR 240 59 32</font>
<br><font size=2 face="sans-serif">         
      OUTLINECOLOR 0 0 0</font>
<br><font size=2 face="sans-serif">        END</font>
<br><font size=2 face="sans-serif">END</font>
<br><font size=2 face="sans-serif">#for the legend NAME will be replaced
by TITLE and SIZE  value will be  change in dostuff.php</font>
<br><font size=2 face="sans-serif">CLASS</font>
<br><font size=2 face="sans-serif">        NAME
"rmax"</font>
<br><font size=2 face="sans-serif">        STYLE</font>
<br><font size=2 face="sans-serif">         
      SYMBOL 'CIRCLE'</font>
<br><font size=2 face="sans-serif">         
      SIZE 15 #dummy value</font>
<br><font size=2 face="sans-serif">         
      COLOR 240 59 32</font>
<br><font size=2 face="sans-serif">         
      OUTLINECOLOR 0 0 0</font>
<br><font size=2 face="sans-serif">        END</font>
<br><font size=2 face="sans-serif">END</font>
<br><font size=2 face="sans-serif">CLASS</font>
<br><font size=2 face="sans-serif">        NAME
"rmoy"</font>
<br><font size=2 face="sans-serif">        STYLE</font>
<br><font size=2 face="sans-serif">         
      SYMBOL 'CIRCLE'</font>
<br><font size=2 face="sans-serif">         
      SIZE 13 #dummy value</font>
<br><font size=2 face="sans-serif">         
      COLOR 240 59 32</font>
<br><font size=2 face="sans-serif">         
      OUTLINECOLOR 0 0 0</font>
<br><font size=2 face="sans-serif">        END</font>
<br><font size=2 face="sans-serif">END</font>
<br><font size=2 face="sans-serif">CLASS</font>
<br><font size=2 face="sans-serif">        NAME
"rmin"</font>
<br><font size=2 face="sans-serif">        STYLE</font>
<br><font size=2 face="sans-serif">         
      SYMBOL 'CIRCLE'</font>
<br><font size=2 face="sans-serif">         
      SIZE 15 #dummy value</font>
<br><font size=2 face="sans-serif">         
      COLOR 240 59 32</font>
<br><font size=2 face="sans-serif">         
      OUTLINECOLOR 0 0 0</font>
<br><font size=2 face="sans-serif">        END</font>
<br><font size=2 face="sans-serif">END</font>
<br>
<br>
<br><font size=2 face="sans-serif">The client call a php script instead
of mapserver WMS requests</font>
<br><font size=2 face="sans-serif">The php script query the DB to get the
values and modify the TITLE and SIZE of the classes and launch the GetMap,GetFeatureInfo
and getLegendGraphic requests.</font>
<br>
<br><font size=2 face="sans-serif">Thanks for your help<br>
Steve</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Daniel Morissette <dmorissette@mapgears.com>@lists.osgeo.org</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : mapserver-users-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">2012-12-19 10:34</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">mapserver-users@lists.osgeo.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[Polluriel potentiel]  Re: [mapserver-users]
proportional circle legend</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Hi Steve,<br>
<br>
I think your best would be to set a KEYIMAGE in your CLASS:<br>
<br>
http://mapserver.org/mapfile/class.html<br>
<br>
Daniel<br>
<br>
<br>
<br>
On 12-12-17 1:39 PM, Steve.Toutant@inspq.qc.ca wrote:<br>
><br>
> Hi,<br>
> I created a thematic map showing proportional circles. I did that
by<br>
> using a table attribute for the SIZE of my circles. It works great.<br>
> CLASS<br>
> NAME 'Pop'<br>
> STYLE<br>
>          SYMBOL 'CIRCLE'<br>
>          SIZE [rayonquot]<br>
>          COLOR 168 221 181<br>
>          OUTLINECOLOR 0 0 0<br>
> END<br>
> END<br>
><br>
> I would like to generate a nice legend for this layer. Currently I
get a<br>
> small dot. I would like to create a commonly used legend for<br>
> proportional circles such as<br>
> http://www.google.ca/imgres?imgurl=http://makingmaps.files.wordpress.com/2007/08/scaled-circles.png&imgrefurl=http://makingmaps.net/2007/08/28/perceptual-scaling-of-map-symbols/&h=437&w=684&sz=49&tbnid=9UOZ3j0H8Wah_M:&tbnh=77&tbnw=120&zoom=1&usg=__m0l8_OAAITIGopuQGi7_yE7Ge4I=&docid=1U4GvObRwxH3MM&hl=fr&sa=X&ei=YGbPUO3NLKmq0AG2t4FA&ved=0CDgQ9QEwAQ&dur=656<br>
><br>
><br>
> or<br>
><br>
> http://www.google.ca/imgres?imgurl=http://www.historicalatlas.ca/website/hacolp/defining_episodes/military/unit_40/images/LEG_INFO_CE1419_final_rest.gif&imgrefurl=http://www.historicalatlas.ca/website/hacolp/defining_episodes/military/unit_40/U40_leg_info_CE1419.htm&h=90&w=217&sz=4&tbnid=nxf1TkPjY35LxM:&tbnh=50&tbnw=120&zoom=1&usg=__FbmbgCcqIwMCjLtNgWix6tyWeXc=&docid=dtQd4I2ykpB1FM&hl=fr&sa=X&ei=YGbPUO3NLKmq0AG2t4FA&ved=0CD4Q9QEwAw&dur=413<br>
><br>
><br>
> Any ideas on how to do that?<br>
> thanks<br>
> steve<br>
><br>
><br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> mapserver-users@lists.osgeo.org<br>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
><br>
<br>
<br>
-- <br>
Daniel Morissette<br>
http://www.mapgears.com/<br>
Provider of Professional MapServer Support since 2000<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.org<br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</font></tt>
<br>
<br>
<br>