Hi geoserver list,
i was experimenting with WMS getfeatureinfo. Thus i wanted to style the response a little bit. I was reading about geoserver templates here: http://geoserver.org/display/GEOSDOC/KML+Placemark+Templates. I thought it's a simple issue to copy the hello world-example: Just save a file called description.ftl with the content hello world in my /geoserver/data/featureTypes/featureTypeXY directory, restart geoserver and call GetFeatureInfo for featureTypeXY.
Sounds simple, but didn't work. Has anybody an idea, which screw to turn to make it work (i'm running release 1.7.0)?
Regards
Albrecht
mailto:aweiser-at-gmx.de
On Wed, 2009-03-04 at 09:18 +0100, Albrecht GMX wrote:
Hi geoserver list,
i was experimenting with WMS getfeatureinfo. Thus i wanted to style the response a little bit. I was reading about geoserver templates here: http://geoserver.org/display/GEOSDOC/KML+Placemark+Templates. I thought it's a simple issue to copy the hello world-example: Just save a file called description.ftl with the content hello world in my /geoserver/data/featureTypes/featureTypeXY directory, restart geoserver and call GetFeatureInfo for featureTypeXY.
Sounds simple, but didn't work. Has anybody an idea, which screw to turn to make it work (i'm running release 1.7.0)?
Regards
Albrecht
mailto:aweiser-at-gmx.de
The KML title and description templates do not apply to GetFeatureInfo
requests; use header.ftl, footer.ftl and content.ftl instead. You
shouldn't even need to restart, but the templates will need to be
modified a little (a list of features is given to the template, rather
than the template being rendered individually for each feature).
More info is available here:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates
Hope this helps.
--
David Winslow
OpenGeo - http://opengeo.org/
Hi,
yes, now it works! After adding header.ftl, footer.ftl and content.ftl, the templates are being processed.
Thanks
Albrecht
The KML title and description templates do not apply to GetFeatureInfo
requests; use header.ftl, footer.ftl and content.ftl instead. You
shouldn't even need to restart, but the templates will need to be
modified a little (a list of features is given to the template, rather
than the template being rendered individually for each feature).
More info is available here:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates
Hope this helps.
--
David Winslow
OpenGeo - http://opengeo.org/
mailto:aweiser@anonymised.com