The JSON template has *[feature trimlast=","]* for a single layer that may return multiple records, but I don't see that functionality for the whole JSON object. For example if I have two layers but only one returns results I end up with a trailing comma and invalid JSON.
// MapServer template { [resultset layer=layer1] { [feature trimlast=","] { ... } [/feature] }, // might need to trim this comma if layer below doesn't return result [/resultset] [resultset layer=layer2] { [feature trimlast=","] { ... } [/feature] } // no comma here because we think it's last result object [/resultset] } I can work around it by putting a comma and empty object at the end: ,{} which is the way I've done it when writing JSON with standard templates, but that's sort of inconsistent with the [feature trimlast=","] option. Am I missing anything? Should I file a feature enhancement request? And trimlast="," does seem to need to require double, not single quotes. Thanks, Rich -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users