[mapserver-users] Parameter substitution problem

Steve Lime sdlime at gmail.com
Fri Sep 23 04:55:13 EDT 2011


My guess is the validation is correct but the syntax of the URL parameter is
is wrong in that the value passed for DATA is not quoted. If you unquote the
default value in your mapfile does that result in a error? That would be an
easy way to test the need for quotes.

One last idea, while map_layer... should work, try map.layer... instead as
you variable name.

If you're really are just replacing the date part you could do that by doing
a runtime sub...

 DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png"
 VALIDATION
     date 'regex'
 END

And then you pass date as a CGI variable.

Steve

On Thursday, September 22, 2011, Asad Ullah <Asad.Ullah at sigmaspace.com>
wrote:
> List,
> I am trying to substitute DATA parameter in my mapfile with a call from
Openlayers as follow:
>
> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png"
>
> The mapfile is:
>
> LAYER
>  NAME "OMI_CP"
>     TYPE RASTER
>     STATUS DEFAULT
>     OFFSITE 0 0 0
>  PROJECTION
>     "init=epsg:4326"
>   END
>     DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png"
> VALIDATION
>   'DATA' '^OMI_.*\.png$'
> END
>
> The call should change the date part (20110922) of the png filename but it
is not doing it. Can anyone point to what I am doing wrong here?
>
> Thanks,
>
> Asad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110923/1f5d68a9/attachment.html


More information about the mapserver-users mailing list