You can't muck about with NAMEs. In 6.0 we did finally hook the TITLE attribute
up for legend production (takes precedence over NAME) as always intended. A
class title can be changed within the limits established by its validation
settings. For example:
LAYER
NAME 'foo'
...
VALIDATION
'title' '^[A-z]{5,20}$' # title's can be between 5 and 20 characters long
consisting only of alpha characters
END
...
CLASS
NAME 'bar'
TITLE 'my default title'
...
END
END
Then via URL you could do:
...&map.layer[foo].class[bar]=TITLE+'New+Title'&...
At least that's the plan. You might give it a shot against the latest beta.
Steve
From: [email protected]
[mailto:[email protected]] On Behalf Of Eric Weisbender
Sent: Thursday, April 21, 2011 3:29 PM
To: [email protected]
Subject: [mapserver-users] Dynamic Layer name in Legend
How would you dynamically generate a layer name in the map legend with use
input or url substitutions. Right know I imagine it looking something like
this...
CLASS
NAME "Entered Point'%[xytext]'"
SYMBOL "xsymbol"
COLOR 0 0 0
SIZE 12
but is obviously it does not work... this is just a excerpt from the layer
def. Any help is greatly appreciated.
Thanks,
EW
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users