[mapserver-users] Multi template

Lime, Steve D (MNIT) steve.lime at state.mn.us
Fri Sep 8 08:18:30 PDT 2017


Hi Pierre: Ok, I whipped up a test. It is possible to use both the legacy templates and the output format method. The key is setting a value for the WEB object QUERYFORMAT parameter. If that parameter is set to some value that doesn't match any existing OUTPUTFORMAT names then MapServer will use the legacy approach. So this means you can do something like:

WEB
  QUERYFORMAT "default" # use the legacy approach
END

and as long as there is no OUTPUTFORMAT named "default" then MapServer with use the legacy approach. If you don't set QUERYFORMAT or set it to the name of a an existing OUTPUTFORMAT then there is no path to the legacy approach unless you set the CGI parameter qformat to something that doesn't exist.

I hope that's not too confusing.

I have a test case with  two OUTPUTFORMATs and QUERYFORMAT "default"...

  http://maps1.dnr.state.mn.us/cgi-bin/mapserv70?map=/usr/local/mapserver/apps/test/templates/test.map&mode=nquery (gets legacy approach)
  http://maps1.dnr.state.mn.us/cgi-bin/mapserv70?map=/usr/local/mapserver/apps/test/templates/test.map&mode=nquery&qformat=mytemplate1 (gets OUTPUTFORMAT one)
  http://maps1.dnr.state.mn.us/cgi-bin/mapserv70?map=/usr/local/mapserver/apps/test/templates/test.map&mode=nquery&qformat=mytemplate2 (gets OUTPUTFORMAT two)

This is consistent with how I remember setting this up, it's just been awhile and I don't use the legacy approach much anymore.

Steve

-----Original Message-----
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of pe_lord
Sent: Wednesday, September 06, 2017 7:56 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Multi template

What about your own curiosity?
I've retried and I get the same behavior. And you?

Pierre



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list