That works great!!<br><br>I did have to change the comments in my mapfile to be sure I had ## rather than just #.&nbsp; Otherwise errors and missed lines happened.<br><br>Thanks for the info.<br><br>Jerl<br><br><div><span class="gmail_quote">
On 1/30/06, <b class="gmail_sendername">Siki Zoltan</b> &lt;<a href="mailto:siki@agt.bme.hu">siki@agt.bme.hu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>AFAIK you cannot create variable in the map file, but you can use the<br>cpp (the c preprocessor) to create macro substitution.<br>For example<br>#define HIGHWAY_COLOR 123 43 112<br>#define HIGHWAY_MAX_SCALE 1600
<br><br>...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MAXSCALE HIGHWAY_MAX_SCALE<br>...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COLOR HIGHWAY_COLOR<br>...<br><br>then<br>cpp map_file_with_defines &gt; generated_map_file<br><br>Bye<br>Zoltan<br><br>On Mon, 30 Jan 2006, Jerl Simpson wrote:
<br><br>&gt; Hello,<br>&gt;<br>&gt; I know I can easily use variables in a mapfile, when the value comes from<br>&gt; cookies or a GET request.&nbsp;&nbsp;But what about setting a variable inside the<br>&gt; mapfile itself?<br>&gt; Something like:
<br>&gt;<br>&gt; HIGHWAY_MAX_SCALE=2000000<br>&gt; HIGHWAY_MIN_SCALE=90000<br>&gt;<br>&gt; or<br>&gt;<br>&gt; HIGHWAY_COLOR=&quot;255 250 115&quot;<br>&gt;<br>&gt; then be able to use something like:<br>&gt;<br>&gt; COLOR&nbsp;&nbsp;%HIGHWAY_COLOR%
<br>&gt;<br>&gt; in a CLASS<br>&gt;<br>&gt;<br>&gt; That way if I decide I want to change a color, I can change it once, and<br>&gt; have it take affect for everywhere else?<br>&gt;<br>&gt; Thanks,<br>&gt;<br>&gt;<br>&gt; Jerl
<br>&gt;<br><br></blockquote></div><br>