Mapfile enhancement request {YEAR}

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Mon Jan 9 19:46:42 EST 2006


Paul Ramsey wrote:
> This is where the famous "use cpp and make" solution is handy.   Manage 
> your mapfiles like they are code.  You can have macro  expansion neatly 
> fill out things like standard colors, scales, and...  years.
> Paul

Thats a great idea. Changing the text is not really the problem I did it 
we sed in about 2 seconds. The real issue is the fact that the files 
need to be tested, released, and deployed to about 15 servers and the 
effort and inherit risk of making changes.

Having a time/date like marcos would solve this, but it also might open 
some interesting possibilities for others to do things like having time 
dependent layer classifications, etc. Not unlike have time/date function 
in postgres.

I guess, I could change the copyright layer to get it's label text from 
a postgis connection, but that does seem like overkill and unneeded 
complexity as none of my mapfiles currently have a postgis connection.

-Steve

> On Jan 9, 2006, at 7:44 AM, Stephen Woodbridge wrote:
> 
>> Hi,
>>
>> I have to update a bazillion mapfiles to change the Copyright year  
>> and I thought it would be a nice feature to have current year as a  
>> variable within the map files so one could do something like:
>>
>> TEXT "Copyright {YEAR}, ..."
>>
>> Any thoughts ...
>>
>> -Steve W.
> 
> 



More information about the mapserver-users mailing list