Define a variable

Stephen Lime steve.lime at dnr.state.mn.us
Fri Jul 14 10:46:19 EDT 2000


You can define a var when the application is first accessed and use it
as a "pass-through" var, but in this case it's sort of unnecessary. Symbol
set paths etc can all be defined relative to the location of your mapfile. So
in your mapfile there is really no reason to have full paths. Using your example
and assuming the mapfile is: 

   /lotus/domino/data/domino/spaziogisit/mapserver/cartsic/mymap.map

then you'd define:

  LINESET symbols/line.sym
  MARKERSET symbols/marker.sym

and so on...

Your mapfile location only really need be specified once, on the initial call
to the application, either a url or a start page. In your template files you
can use substitutions like:

  <input type="hidden" name="map" value="[map]">

to pass through the mapfile path information.

In most of my apps I have to set path values for one file (the mapfile) in
one spot and that's it.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> <aborruso at spaziogis.it> 07/14/00 03:21AM >>>
Dear user,
my map file and my template file and ... are in a folder with a long path
(something like
/lotus/domino/data/domino/spaziogisit/mapserver/cartsic/symbols/line.sym);
can I define a variable like mapserver=
/lotus/domino/data/domino/spaziogisit/mapserver/  to point more easily to
my work folder??
Thank you,

Andrea





More information about the mapserver-users mailing list