W dniu 01.10.2015 o 12:04, Andrea Aime pisze: > On Thu, Oct 1, 2015 at 11:52 AM, Maciej Filocha <m.filo...@icm.edu.pl > <mailto:m.filo...@icm.edu.pl>> wrote: > > Hi, > > I'm using windbarbs with following definition: > > > <WellKnownName>windbarbs://default(<ogc:PropertyName>speed</ogc:PropertyName>)[m/s]</WellKnownName> > > Everything works as expected except the "Preview legend" command that > throws an error: > > ERROR [wicket.RequestCycle] - The specified mark > strConcat([strConcat([windbarbs://default(], [speed])], [)[m/s]]) was > not found! > > Any ideas? > > > Simple, in the preview we have no values for the speed attribute, so no > mark can be generated (there, and in > GetLegendGraphics). We'd need some way to specify default values, but > it's not so easy... > something like "if_the_else(isNull(speed),10,speed)" should do the > trick, but as OGC expression it's a bit > long winded... I don't remember if we allow using ${...} expression in > well known mark, but you can give it a > try: > > <WellKnownName>windbarbs://default(${if_the_else(isNull(speed),10,speed)})[m/s]</WellKnownName>
After changing "if_the_else" to "if_then_else", I got: 2015-10-01 10:17:06,196 ERROR [wicket.RequestCycle] - Filter Function problem for function strConcat argument #0 - expected type String java.lang.IllegalArgumentException: Filter Function problem for function strConcat argument #0 - expected type String at org.geotools.filter.function.FilterFunction_strConcat.evaluate(FilterFunction_strConcat.java:52) at org.geotools.filter.expression.ExpressionAbstract.evaluate(ExpressionAbstract.java:65) Anyway, I can live without legend preview... Maciej ------------------------------------------------------------------------------ _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users