<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-CA vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2>Joanne -</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2>Not only have I done it for several years, I seem to
regularly report on it in response to this question! I use mapfiles that
say things like:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2>#define UTM_ZONE 12</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2>#include "shaded.inc"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2>etc. They look just like C source code, so I do the
obvious thing one would do with C source code - run them through a C
compiler! Just tell your compiler to only run the first preprocessor pass
and save the output to the generated mapfile.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2>This gives you the benefits of #include syntax and avoids
the need to reprocess everything for every map request - you just re-run your
mapfile generation scripts each time you change something.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2> - Ed</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984453421-04062005><!-- Converted from text/plain format -->
<P><FONT size=2>Ed McNierney<BR>President and Chief Mapmaker<BR>TopoZone.com /
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North Chelmsford,
MA 01863<BR>Phone: +1 (978) 251-4242<BR>Fax: +1 (978)
251-1396<BR>ed@topozone.com</FONT> </P></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List
[mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>On Behalf Of </B>McGraw,
Joanne<BR><B>Sent:</B> Friday, June 03, 2005 8:51 AM<BR><B>To:</B>
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS]
"includes" in mapfiles?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there any syntax for including
the contents of another file in a mapfile?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have about 60+ layers that need to
go online and most of them fall into fairly clear groups of five layers each.
Based on their selection in a drop-down list, users will indicate the group of
maps they are interested in looking at and the application will load that map
file. There are, however, about 10 ancillary layers of data that should be
available no matter what map is loaded (roads, hydro, cities, etc.). Rather than
repetitively defining this information in every map file, is there any way I can
define the ancillary layers in one file, and then simply load that file’s
contents from within the other map files?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I’m not sure what to call these
except “includes.” I haven’t had any luck in the archive with that expression,
but I cannot believe no one has wanted to do this before.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Cheers,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">jtm</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Joanne T. McGraw<BR>Spatial
Data Visualization Specialist / Spécialiste en visualisation des données
spatiales<BR>Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire
Canada<BR>Telephone/Téléphone: (613) 759-6103<BR>Facsimile/Télécopieur: (613)
759-1937<BR>960 Carling Ave, #1136<BR>Ottawa, Ontario<BR>K1A
0C6</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><A
href="mailto:mcgrawj@agr.gc.ca">mcgrawj@agr.gc.ca</A></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><IMG height=24
alt="Agriculture and Agri-Food Canada - Agriculture et Agroalimentaire Canada"
src="cid:984453421@04062005-103D" width=278 border=0></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P></DIV></BODY></HTML>