Generating images only
Mark Wright
sparkymeister at GMAIL.COM
Fri Dec 16 22:29:05 PST 2005
I posted this the other day on another thread. It is a php example,
but I would think you could do the same in cgi.
In the map img tag set the src attribute to a php file with a
querystring stating everything needed to get the correct map and
settings. When it's time to save the generated image do the following:
header('Content-type: image/png');
$image->saveImage('');
This will send the image to the browser instead of saving it to disk
and set the proper mime type so that the browser knows it is receiving
image data. If you are generating an image in a format other than png
simply change the content-type to match.
Mark
On 12/16/05, Brian Peschel <brianp at occinc.com> wrote:
> I have an application that needs to display a map image. I was thinking of
> using MapServer to generate that image for me. I have worked through the
> O'Reilly book and most of the tutorial and I stumbled across a question
> which I am sure is answered somewhere, but I didn't find it searching
> through the online documentation at http://mapserver.gis.umn.edu
>
> 1) Is there a way to generate just the image? I don't want all the
> surrounding web page (ie the global.html file) just the image. My
> appliction will handle all the zooming, hull size, etc. Is there a
> parameter to the CGI to say just generate the image and not the HTML? I am
> dealing with an applet and would like to skip the step of reading the HTML
> to get the image info and make a second request for the image.
>
> 2) Is there documentation for the various *Script interfaces? I have some
> interest in using MapServer inside a C++ application, again, just to
> generate the images displayed.
>
> Thanks in advance.
>
> Brian
>
--
Have fun or die trying - but try not to actually die.
http://www.AboveCalifornia.com
Got Mac OS X? Get the AboveCalifornia Sherlock Channel:
sherlock://www.AboveCalifornia.com/sherlock/SherlockChannel.xml?action=add
More information about the MapServer-users
mailing list