It seems that the Freemarker templates provide a staightforward way of
customizing the GeoServer output. In addition to the templates listed in
the tutorial, it seems that many other useful templates that could be
developed that would likely have very similar implementations to the
templates that have already been implemented.
For example, following the KML template tutorial, the description.ftl
template allows you to set the description element of the placemark.
description.ftl
''This is ${STATE_NAME.value} state which has a population of
${PERSONS.value}."
yields KML like...
<Placemark>
<description>This is Michigan state which has a population of
9,295,297.</description>
...
</Placemark>
It seems that a similar pattern could be used to add temporal information to
a KML placemark
for example (KML timestamp information):
kml_timestamp.ftl
"${ADMIS_DATE.value}"
could add a timestamp element to the KML...
<Placemark>
...
<TimeStamp><when>2001-04-17</when></TimeStamp>
...
</Placemark>
another example (KML timespan information)...
kml_timespan.ftl
"<begin>${ADMIS_DATE.value}</begin><end>${FUTURE_DATE.value}</end>"
could add a timestamp element to the KML...
<Placemark>
...
<TimeSpan><begin>2001-04-17</begin><end>2050-01-12</end></TimeSpan>
...
</Placemark>
Granted, I'm not a java developer and I have no idea what coding needs to go
on behind the scenes, but the templates seem to follow a very similar to
what has already been implemented...
Cheers,
Tyler
aaime wrote:
Hi,
I've just added a couple of new template tutorials:
http://docs.codehaus.org/display/GEOSDOC/GetFeatureInfo+templates
http://docs.codehaus.org/display/GEOSDOC/Freemarker+templates
Anyone willing to have a look and comment?
In not particularly satisfied by the data model we are providing
for feature, maybe we should refer the feture type model from
it instead of just the name?
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
View this message in context: http://www.nabble.com/New-templating-tutorials-tf4096488.html#a11695342
Sent from the GeoServer - Dev mailing list archive at Nabble.com.