[mapserver-users] Dynamic map legends

Steve Lime Steve.Lime at dnr.state.mn.us
Thu Aug 20 08:09:54 PDT 2009


This must be the "next error" you referred to... ;-)

Not all parameters are affected by URL overloading. That's mechanism was added primarily as a means
of changing a portion of a parameter and that only made sense for a select few.

In 5.4 a class name cannot be changed via URL, again I can supply a patch if necessary. In other words
you're kinda stuck.

All this makes me wonder though. Why not just write a custom mapfile rather than trying to change 
everything by URL? You're already using perl.

Steve

>>> On 8/20/2009 at 9:25 AM, in message
<a05f60f80908200725rcf9faf8i88a8be78e85b48b9 at mail.gmail.com>, Ethan Gruber
<ewg4xuva at gmail.com> wrote:
> I've run into a glitch with the migration project I am working on.  The map
> has a legend that is generated dynamically from population data.  The .map
> file contains a layer that defines the key for the legend.  Here's an
> example:
> 
> CLASS
>         NAME "xx"
>         EXPRESSION "xx"
>         COLOR 100 200 100
>         OUTLINECOLOR 0 0 0
> END  # CLASS
> 
> There are url parameters defined in a perl script that contain the string
> for the NAME and EXPRESSION.  Those parameters no longer work, like the
> dynamic shapepath I asked about a few days ago.  I thought that perhaps I
> could pass the parameters in a similar manner:
> 
> CLASS
>         NAME '%map_theme_class_1_name%'
>         EXPRESSION '%map_theme_class_1_expression%'
>         COLOR 200 250 200
>         OUTLINECOLOR 0 0 0
> END  # CLASS
> 
> But the legend just displays the string "%map_theme_class_1_name%" instead
> of the value bound by that parameter.  Any clues on how to proceed?
> 
> Ethan




More information about the MapServer-users mailing list