[Mapserver-users] have a dynamic map file?

Oliver Wesp wesp at gdv.com
Thu Mar 6 06:28:15 EST 2003


Hi,
you can define a static raster layer in your mapfile and if the user 
selects one of the tiffs it's possible to change the DATA value of this 
layer dynamically via CGI. The form variable should look like this:

<input type="hidden" name="map_LAYERNAME_data" value="path/to/tif">

That way you can display any of your tiffs without generating a new map 
file. All you need is client side processing of the pathnames.

hope that helps.
Oliver

P.S. If you're using 3.7 you need to define DATAPATTERN in order to change 
the datasource of a layer. There was a post a few days ago (02/27) from Jan 
Hartmann which explains the use of DATAPATTERN.


At 18:50 06.03.2003 +0800, =?gb2312?q?Chen=20Fu?= wrote:
>Hi!
>
>I am using mapserver as server to browse satellite
>image quickview (resampled image) . my question is how
>to have a dynamic map file.
>
>In demos of mapserver, we only select some layers that
>are already described in map file, and [layers] tell
>cgi to show some and hide others.
>
>Because there is thousands of images, and in mapserver
>one image must be a layer, i must dynamic generate a
>new map file to tell mapserver which tiff must be
>catched to render. But i dont know how to do it yet.

-- 
Dipl.-Geogr. Oliver Wesp
Gesellschaft für geografische Datenverarbeitung
Binger Strasse 49-51
D-55218 Ingelheim
fon: +49 6132 714818
fax: +49 6132 714828
http: <http://www.gdv.com>www.gdv.com





More information about the mapserver-users mailing list