Variable Substitution

Steve Lime Steve.Lime at DNR.STATE.MN.US
Wed Dec 6 16:07:01 EST 2006


There are no immediate plans to extend runtime substitutions to the
whole mapfile, not in the next couple of days anyway. That said, you
don't need for substitution if you are replacing an entire value. There
is already a syntax for that. For example to change a scalebar units
you'd set map_scalebar_units=meters. For manipulating styles there are a
couple of caveats:

 - the syntax is clunky, for example to modify the color of the first
class in layer 'foo' you'd use: map_foo_class_0_color=255+0+0

 - since nobody seems to use this feature I did not bother to extend it
to fully support styles. It uses the old class-level syntax for
manipulating colors, symbols and such. For that reason you can only muck
with the first 2 styles. For example:

  - style 0 symbol: map_foo_class_0_symbol=triangle
  - style 1 symbol: map_foo_class_0_overlaysymbol=square

It's not optimal but it works for the most part. 

Steve



More information about the mapserver-users mailing list