Opened 20 years ago

Last modified 19 years ago

#797 new enhancement

variables in MAP file

Reported by: bartvde@… Owned by: sdlime
Priority: high Milestone: FUTURE
Component: MapServer C Library Version: 4.3
Severity: minor Keywords:
Cc:

Description

In my opinion it would be a nice enhancement to be able to define variables in
your MAP file which you can use throughout the MAP file.

E.g.
DEFINE WMS_URL "http://www.vz.geodan.nl:8080"

LAYER
  CONNECTION "%WMS_URL%/ms4w/apps/zeegras/map/zeegras_server.map&"

Or any other syntax. This can lighten configuration. Ofcourse this can be done
by using a scripting environment, but not everybody wants to use a scripting
environment to get this done.

Thoughts?

Change History (3)

comment:1 by sdlime, 20 years ago

Interesting idea. Personally I think it's more useful to control variables like 
that from outside the mapfile than within. That is, pass in WMS_URL as a 
variable via the CGI program. That support is already there for a limited 
number of elements such as DATA, CONNECTION and EXPRESSIONs.

It's worth leaving here as a feature request though cause it may be real easy 
to add later...

Steve

comment:2 by bartvde@…, 20 years ago

Hi Steve,

this especially comes in handy when using MAP files as the configuration file
for Chameleon. These MAP files are read by php_mapscript and determine which
layers will be present in the Chameleon application.

Bart

comment:3 by bartvde@…, 19 years ago

Milestone: FUTURE
Setting target to future.
Note: See TracTickets for help on using tickets.