SV: [mapserver-users] Generic template for WMS GetFeatureInfo
julho at kms.dk
Mon Sep 19 03:36:57 EDT 2011
thanks for the tip. Most of my users have desktop GIS systems (MapInfo,
In the mean time, could you expand a bit on the "new-style templates"?
All I have done so far is according to
http://mapserver.org/mapfile/template.html#template, and I don't
remember that this says anything about inclusion of subtemplates.
Fra: Steve Lime [mailto:sdlime at gmail.com]
Sendt: 15. september 2011 20:43
Til: Hollingbery, Julian
Cc: <mapserver-users at lists.osgeo.org>
Emne: Re: [mapserver-users] Generic template for WMS GetFeatureInfo
Hi Julian: You might try the [items] and [values] template tags combined
and values for a feature or set of features. You could split the output
into arrays and display however you like. The attributes are just
slammed together into 1 comma delimited string, so this approach won't
work if your attribute data contains commas I fear. The same template in
theory could be used for any layer then... You could use new-style
templates (e.g. Via output formats) with template includes and handle
this with 2 files- the main template and the shared include...
I notice those tags aren't documented so I'll create a ticket to do so.
Should also probably enhance those tags, at least the values one, to
take some simple formatting options.
Sent from my iPad
On Sep 14, 2011, at 8:39 AM, "Hollingbery, Julian" <julho at kms.dk> wrote:
I too want to serve GetFeatureInfo requests. However, I wonder
if it is necessary to have a template per layer, when all I want to do
is "show all attribute values in a HTML table". The thing is, I have a
handful of services with approx. 40 layers in each. Each layer has on
average a dozen attributes, so all in all, I am looking to simplify
maintenance of 2000 HTML table cells. Has anyone done anything in a
script or otherwise, so that one can use the same template file on
layers with varying attribute lists?
I am considering utilising the fact that a TEMPLATE statement
can reference a URL: I imagine that this might refer to a PHP-script,
which takes e.g. a database table name, and returns a HTML response with
the column names. Has anyone done anything like this?
mapserver-users mailing list
mapserver-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-users