[mapserver-users] How to format a GetfeatureInfoRequest results?
Lime, Steve D (DNR)
Steve.Lime at state.mn.us
Mon Mar 14 06:28:56 PDT 2011
There is limited "logic" support in the item tag. There are two attributes to consider:
- nullformat, sets the string to be displayed if the item is empty
[item name=test nullformat="n\a" ...]
- pattern, sets a regex to check the item against, results are only displayed if the item value matches
[item name=test pattern="foo" format="bar"]
You might be able to combine the two, not sure about that though. Let me know if you have questions.
Steve
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of sulu
Sent: Monday, March 14, 2011 8:14 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] How to format a GetfeatureInfoRequest results?
Hi.
I'm in search of information/tutorial on formatting GetfeatureInfoRequests
by using HTML-Templates.
As an example; assume there is an attibute "test" which may have some
content or may not.
As far as i know i can format the result in the Body-HTML-Template like
that:
[item name=test format=$value escape=none]
This works but i would like to add some logic in order to improve it a bit.
E.g. add an if clause that returns "n/a" if the attribute has no content or
turn it red if the value exceeds som threshold.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-format-a-GetfeatureInfoRequest-results-tp6168987p6168987.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list