hi Ryan,
try to add the validation pattern inside the layer tag

METADATA
     'file_validation_pattern'    "[A-Z0-9._%+-|'\(\)]"
'default_file' "ultima_imatge" #-------> this is to give a value when you don't put the &file=value in the url call
 END

 VALIDATION
     'file'    "[A-Z0-9._%+-|'\(\)]"
 END

DATA '%file%'


Helen


El 21/05/12 17:55, Ryan Dussiaume escribió:

Hi,

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.

Here's the mapfile:

MAP

    NAME Blah2

    STATUS ON

    SHAPEPATH "C:/Contours/FSGrids"

    PROJECTION "init=epsg:26918" END

    LAYER

        NAME Contour

        TYPE RASTER

        STATUS ON

        DATA '%file%'

        CLASS

            NAME "Contour"

        END

        PROJECTION "init=epsg:26918" END

    END # Layer

END

And here is a sample request for one of the tiles that I've copied from Fiddler ...

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 <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>

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.

Any help is very much appreciated, thanks!

Ryan



_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to