Hello all,
I’m trying to add layer title in JSON response for getFeatureInfo, but no luck.
I can see both name and title in UI, how can I return them for each Feature in
FeatureCollection?
My current content_json.ftl:
{
"type": "Feature",
"layer_id": "${type.name}",
"layer_namespace" : "${type.namespace}",
"id" : "${feature.fid}",
<#list feature.attributes as attribute>
<#if attribute.isGeometry>
"geometry": ${geoJSON.geomToGeoJSON(attribute.rawValue)},
</#if>
</#list>
"properties": {
<#list feature.attributes?filter(a -> !a.isGeometry) as attribute>
"${attribute.name}": "${attribute.value}"
<#if attribute_has_next>
,
</#if>
</#list>
}
}
<#if feature_has_next>
,
</#if>
</#list>
--
Tatyana .
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users