<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi,<br></div><div><br></div><div>I'm not sure if you have a custom template for each layer already, or if this something you want to avoid?<br></div><div><br></div><div>I'm guessing ideally you want to be able to change the LAYER - TEMPLATE via the URL?<br></div><div>Although this is not listed in the docs at <a href="https://mapserver.org/cgi/runsub.html#parameters-supported">https://mapserver.org/cgi/runsub.html#parameters-supported</a> looking at the source I think it can be replaced via a URL. </div><div><br></div><div>You can also set a CLASS TEMPLATE via the URL, and maybe have a different CLASS for each INFO_FORMAT and select it with GetStyles. <br></div><div><br></div><div>Changing the format filename for each layer might be a possibility?<br></div><div><div><a href="https://mapserver.org/cgi/runsub.html#parameters-supported">https://mapserver.org/cgi/runsub.html#parameters-supported</a><br></div><div>OUTPUTFORMAT: FORMATOPTION: FILENAME (must have a <cite>MAP</cite> <cite>VALIDATION</cite> pattern)<br></div></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div>--<br></div><div>web:http://geographika.co.uk<br></div><div>twitter: @geographika<br></div></div><div><br></div><div><br></div><div>On Thu, Jun 25, 2020, at 2:12 PM, <a href="mailto:jorge.mendesdejesus@isric.org">jorge.mendesdejesus@isric.org</a> wrote:<br></div><blockquote type="cite" id="qt" style=""><div id="qt-compose-body-wrapper" dir="auto"><div dir="auto">Dear mapserver community<br></div><div dir="auto"><br></div><div dir="auto">I am trying to set a WMS where the a GetFeatureInfo will support more than one INFO_FORMAT, currently I have text/html implemented [1], which uses a layer level implementation. This works fine when you have only one format <span style="">[2].</span><br></div><div dir="auto"><br></div><div dir="auto">Now I need to have 2 formats, html and geojson/json. <br></div><div dir="auto"><br></div><div dir="auto">Documentation is very clear that the best strategy is to use the OUTPUTFORMAT, each output format associated with a specific template, this works fine .<br></div><div dir="auto"><br></div><div dir="auto">Problem is that all examples that I see using outputformat have a very clear layer name indication (below is nums)<br></div><div dir="auto"><br></div><div dir="auto"><pre><span class="qt-o">//</span> <span class="qt-n">mapserver</span> <span class="qt-n">template</span>
<span class="qt-p">[</span><span class="qt-n">resultset</span> <span class="qt-n">layer</span><span class="qt-o">=</span><span class="qt-n">mums</span><span class="qt-p">]</span><br></pre></div><div dir="auto"><br></div><div dir="auto">This simplely doesn't work if you have 100 layers on a mapfile and we need a output format template for all of them, I have search for some generic parameter that could relay the layer name being used but no luck. With setting the layer name it doesn't work!! And arguments can't be replaced <br></div><div dir="auto"><br></div><div dir="auto">Question :<br></div><div dir="auto">- How can I have a generic [resultset ] that can be use by multiple layers???? [3] <br></div><div dir="auto">- Template at layer level works good but I don't think we can support 2 formats there, is this correct??? <br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">System:<br></div><div dir="auto">mapserver7.6.0 gdal2.4 proj4<br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thank you <br></div><div dir="auto">Jorge de Jesus<br></div><div dir="auto"><br></div><div dir="auto">[1] <a href="https://maps.isric.org/mapserv?map=/map/bdod.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=47.130647,8.931116,48.604188,29.54223&CRS=EPSG:4326&WIDTH=1073&HEIGHT=445&LAYERS=bdod_0-5cm_Q0.5&STYLES=&FORMAT=image/tiff&QUERY_LAYERS=bdod_0-5cm_Q0.5&INFO_FORMAT=text/html&I=509&J=359&FEATURE_COUNT=1" target="_blank">https://maps.isric.org/mapserv?map=/map/bdod.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=47.130647,8.931116,48.604188,29.54223&CRS=EPSG:4326&WIDTH=1073&HEIGHT=445&LAYERS=bdod_0-5cm_Q0.5&STYLES=&FORMAT=image/tiff&QUERY_LAYERS=bdod_0-5cm_Q0.5&INFO_FORMAT=text/html&I=509&J=359&FEATURE_COUNT=1</a><br></div><div dir="auto"><br></div><div dir="auto">[2] https://gis.stackexchange.com/questions/343901/getfeatureinfo-template-of-mapserver-not-replacing-values<br></div><div dir="auto"><br></div><div dir="auto">[3] <span style="">https://pastebin.com/FdepGTf7</span><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto" id="qt-tmjah_g_1299"><p><span class="font" style="font-family:Calibri, sans-serif;"><span style=""><span class="size" style="font-size:14.6667px;">ISRIC — World Soil Information</span></span></span><br></p><p class="qt-MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;"><br></p><p class="qt-MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;">PO Box 353 | 6700 AJ Wageningen<br></p><p class="qt-MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;"><a href="https://www.wageningencampus.nl/nl/campus/over/gebouwen/show/Gaia-gebouwnummer-101.htm" title="https://www.wageningencampus.nl/nl/campus/over/gebouwen/show/Gaia-gebouwnummer-101.htm" target="_blank" style="font-family:Calibri, sans-serif;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;"><span style="text-decoration-line:none;">Droevendaalsesteeg 3 (Building 101) | 6708 PB Wageningen</span></a><br></p><p class="qt-MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;">The Netherlands<br></p><p class="qt-MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;">Telephone (Secretariat): +31 317 483735<br></p><p class="qt-MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:11pt;font-family:Calibri, sans-serif;"><span lang="PT-BR">E-mail: </span><a href="blocked::mailto:soil.isric@wur.nl" title="blocked::mailto:soil.isric@wur.nl" target="_blank" style="font-family:Calibri, sans-serif;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;"><span lang="PT-BR">info@isric.org</span></a><br></p><div><i style="font-family:Calibri, sans-serif;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;"></i><br></div></div></div><div>_______________________________________________<br></div><div>mapserver-users mailing list<br></div><div><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote><div><br></div></body></html>