[mapserver-users] Temporary image files

Walter Lorenzetti lorenzetti at faunalia.it
Tue May 13 04:12:01 EDT 2008


Frank Broniewski ha scritto:
Hi Frank,

> Hi List
>
> I am just setting up a web server for use with mapserver. Targeted use will be 
> php-mapscript and wms map serving.
>
> I was just looking through my mapfiles in order to find file system based 
> configurations like shapepath, imagepath etc. 
>
> Stumbling over imagepath and imageurl parameters, I was wondering for what 
> reason mapserver stores the images in the temporary folder before serving 
> them to the user. When querying mapserver as a wms, there are no temporary 
> files, so this does not seem to be a necessary step to provide a map image to 
> the user.
> Does mapserver reuse these images? Or is the temporary files approach a remain 
> from more static web map pages where the image could be reused more often?
>   
I know this is not possible, because mapserver uses timestamp...
but I don't sure...
> Coming to my next question, I presume that my php code causes the storage of 
> the image - $mapimageurl = $mapimage->saveWebImage();
> Is it possible to deliver the image directly to the browser instead of passing 
> an URI?
>
>   

yes is possible, you've to use $img->saveImage(''); instead of

$mapimageurl = $mapimage->saveWebImage();

and in your php page you've to use

header('Content-type: image/png');

if you use png format image, image/jpeg for jpeg etc...

I hope this can help

W

-- 
Please no  .doc, .xls, .ppt, .dwg:
https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats

Walter Lorenzetti
email+jabber: lorenzetti at faunalia.it
www.faunalia.it
Cell: (+39) 347-6597931  Tel+Fax: (+39) 0587-213742
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy



More information about the mapserver-users mailing list