I am using MapServer 7.4.2 and I am trying to setup a WMS GetFeatureInfo using OUTPUTFORMAT
instead of direct TEMPLATE
but variables are not replaced
On MapServer file layer definition using:
TEMPLATE 'html.tmpl'
and with a html.tmpl
:
<!-- MapServer Template -->
:
<b>Value: </b>[value_0]<br>
:
I have the proper value reply on QGIS 2.18
Value:125
When I try to implement it by replacing the template location with
TEMPLATE 'getfeatureinfo_html'
and creating an OUTPUTFORMAT
option as follows
OUTPUTFORMAT
NAME "getfeatureinfo_html"
DRIVER "TEMPLATE"
FORMATOPTION "FILE=html.tmpl"
MIMETYPE "text/html"
END
The server replies with the correct template BUT the variable is not replaced, resulting in an output like:
<b>Value: </b>[value_0]<br>
Therefore the variable is not being replace and on logs (level 5) I have no indication or an error.
It looks like MapServer is not aware the layer from where to pull the value. Looked at documentation and examples but is not clear how to achieve it (missing layer information).
Later I would like to have a GetFeatureInfo for WMS with multiple mimetype options
Any tips or solutions?
[item name=value_0]
mapserver.org/mapfile/template.html.[item name=value_0]
the variables are not replaced