[Fwd: Re: mapserv stdout png problem]

Tamas Szekeres szekerest at GMAIL.COM
Mon Oct 30 14:20:46 PST 2006


Hi,

AFAIK the only solution to workaround this issue is to create a
template and create the map image using this template. For example
create a template 'template.html' with
the following contents:

[img]

Then invoke mapserv with the query string against this template as for example:

mapserv "QUERY_STRING=mode=browse&map=MyMap.map&id=_&map_web_imagepath=samples\&map_web_template=template.html&map_reference_status=off&map_scalebar_status=embed&map_legend_status=embed&mapsize=1000+1000"

Using the browse mode is required. The 'id' parameter will be appended
to your image name. The output image will be created relative to your
mapfile in the directory given to the  'map_web_imagepath' parameter.

Best Regards,

Tamas Szekeres




2006/10/30, Hubert Asamer <hubert.asamer at univie.ac.at>:
>
>
>
>
> ---------- Továbított levél ----------
> From: Frank Warmerdam <warmerdam at pobox.com>
> To: Hubert Asamer <hubert.asamer at univie.ac.at>
> Date: Thu, 26 Oct 2006 15:55:24 -0400
> Subject: Re: mapserv stdout png problem
> Hubert Asamer wrote:
> > Frank,
> > one more question regarding the FW_Tools mapserv.exe:
> > When i make a query like this: mapserv "Query_string=map=.....&mode=map"
> >  > out.png
> > i get a png with following header: Content-type: image/png
> >
> > Then i must remove the first two lines of the png file and i can view my
> > result-everthing ok!
> > Do you know how to configure my query to avoid these two header lines?
>
> Hubert,
>
> There was some talk recently about adding a commandline switch to mapserv
> to supress this, but looking in the code it looks like nothing was done.
>
> So, no, there is nothing that can be done.
>
> My msautotest test suite has special python code to strip off these mime
> types, and the WxS mapscript wrappers include a mechanism to strip off
> the mime type.  But I can't think of anything you can do when invoking mapserv
> at the commandline.
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>
> __________ NOD32 1.1831 (20061024) Information __________
>
> Diese E-Mail wurde vom NOD32 antivirus system geprüft
> http://www.nod32.com
>
>
>
>
>
>



More information about the MapServer-users mailing list