FORMATOPTION "FILE=...." defines the actual MapServer template to use so it's 
required.

FORMATOPTION 'ATTACHMENT=...'  sets an HTTP header value that effectively names 
the file being returned. That's useful when folks save the response to a file 
otherwise you see long names like "mapserver?my.map&...". It's not required and 
is more of a convenience configuration option for your users.

With the mapserv CGI you change template with the qformat parameter. For 
example, 
"http://yoursite.com/cgi-bin/mapserv?map=my.map&mode=nquery&mapext=...&qformat=json";
 would use whatever format is named "json". Just switch that value to get 
another format.

For WMS I believe you have to pass the mime-type using the FORMAT parameter. 
WFS probably supports something similar...

Steve

-----Original Message-----
From: mapserver-users [mailto:[email protected]] On 
Behalf Of pe_lord
Sent: Monday, May 01, 2017 2:50 PM
To: [email protected]
Subject: Re: [mapserver-users] Multi template

I'm trying to setup these "DRIVER 'TEMPLATE'"
Few more questions!

1- What is the goal/difference of   
FORMATOPTION "FILE=...."
vs 
FORMATOPTION 'ATTACHMENT=...' ?

2- How to not all redirect my query on the same template (json or html).
I've tried for an other layer, my Driver template is used instead of the one
call into the layer section?




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Multi-template-tp5317599p5318988.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to