mapserv stdout png problem

Tamas Szekeres szekerest at GMAIL.COM
Thu Nov 2 12:52:31 PST 2006


Hubert,

I've forgot that the TEMPLATEPATTERN should also be set in the mapfile like:

MAP
  ...
  TEMPLATEPATTERN ""
  ..
END

I've also attached my template.html should be placed along with the mapfile.

If you would rather set the templatepattern with the query string like 
..&map_templatepattern=&..  we could modify msLoadMapString accordingly.


Best Regards,

Tamas Szekeres



2006/11/2, Hubert Asamer <hubert.asamer at univie.ac.at>:
> Tamas,
> I've tried the following command:
> C:\Programme\FWTools1.0.6>mapserv
>
"QUERY_STRING=mode=browse&map=C:\ms4w\apps\maplab-2.2.1\tutorial\mymap2.map&
id=_&map_web_imagepath=images&map_web_template=template.html"
> 
> But the result was a error message like this: mapserv(): Web application
> error. No template provided. <br>
> I think my template is not correct, or my query string is wrong
> (path....). Can you give me a more detailed description of how invoking
> the template (or please send your template) ?
> Thank you for your support,
> Hubert
> 
> Tamas Szekeres wrote:
> > 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=embe
d&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
> >>
> >>
> >>
> >>
> >>
> >>
> >
>  

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.23/513 - Release Date: 2006.11.02.
 



More information about the MapServer-users mailing list