<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Worked like a charm, thanks!<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Ryan<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> mapserver-users-bounces@lists.osgeo.org [mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Helen San Segundo Navazo<br><b>Sent:</b> May 21, 2012 12:23<br><b>To:</b> mapserver-users@lists.osgeo.org<br><b>Subject:</b> Re: [mapserver-users] Runtime Substitution Not Working<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>hi Ryan,<br>try to add the validation pattern inside the layer tag<br><br>METADATA <br> 'file_validation_pattern' "[A-Z0-9._%+-|'\(\)]"<br> 'default_file' "ultima_imatge" #-------> this is to give a value when you don't put the &file=value in the url call<br> END<br><br> VALIDATION<br> 'file' "[A-Z0-9._%+-|'\(\)]"<br> END<br> <br>DATA '%file%' <br><br><br>Helen<br><br><br>El 21/05/12 17:55, Ryan Dussiaume escribió: <o:p></o:p></p><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I’m trying to use runtime substitution to replace the DATA setting of the Mapfile at runtime. I’m running in tile mode and using GRD raster format.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Here’s the mapfile:<o:p></o:p></p><p class=MsoNormal>MAP<o:p></o:p></p><p class=MsoNormal> NAME Blah2<o:p></o:p></p><p class=MsoNormal> STATUS ON<o:p></o:p></p><p class=MsoNormal> SHAPEPATH "C:/Contours/FSGrids"<o:p></o:p></p><p class=MsoNormal> PROJECTION "init=epsg:26918" END<o:p></o:p></p><p class=MsoNormal> LAYER<o:p></o:p></p><p class=MsoNormal> NAME Contour<o:p></o:p></p><p class=MsoNormal> TYPE RASTER<o:p></o:p></p><p class=MsoNormal> STATUS ON<o:p></o:p></p><p class=MsoNormal> DATA '%file%'<o:p></o:p></p><p class=MsoNormal> CLASS<o:p></o:p></p><p class=MsoNormal> NAME "Contour"<o:p></o:p></p><p class=MsoNormal> END<o:p></o:p></p><p class=MsoNormal> PROJECTION "init=epsg:26918" END<o:p></o:p></p><p class=MsoNormal> END # Layer<o:p></o:p></p><p class=MsoNormal>END<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>And here is a sample request for one of the tiles that I’ve copied from Fiddler …<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><a href="http://%3cmy%20server%3e/cgi-bin/mapserv.exe?map=C:/ms4w/Maps/mapfile2.map&file=Site_1_1_1_Total.grd&mode=tile&layers=Contour&tilemode=ve&tile=03023032203031">http://<my server>/cgi-bin/mapserv.exe?map=C:/ms4w/Maps/mapfile2.map&file=Site_1_1_1_Total.grd&mode=tile&layers=Contour&tilemode=ve&tile=03023032203031</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>If I put the filename directly in the DATA setting of the mapfile it works fine and I see the grid in Virtual Earth. If I try to use runtime substitution to put the file name it just produces blank tiles.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Any help is very much appreciated, thanks!<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Ryan<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>mapserver-users mailing list<o:p></o:p></pre><pre><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div></body></html>