Yeah, this is one place where SLD is actually less verbose (because it
magically wraps sequences of expressions in a function call that
concatenates them as strings.)
This syntax should work (untested though):
label: [strConcat(strConcat(strConcat(strConcat("[", attr1), "] (["),
attr2), "])")];
Pretty gross, right? If I think about it a bit I could probably make it
possible to avoid the strConcats; the rule would be that if a list of
properties is found for a label, it is implicitly concatenated. I don't
want to make whitespace significant outside of string literals though, so it
would come out something like this:
label: "[" [attr1] "] ([" [attr2] "])";
(remember if there are commas that means multiple labels.)
What do you think?
--
David Winslow
OpenGeo - http://opengeo.org/
On Thu, May 26, 2011 at 12:20 PM, Charles Galpin <[email protected]> wrote:
> I can't seem to figure out how to use multiple attributes in a label. The
> tutorial says you can use a CQL expression but I am not sure how to
> concatenate strings. I'd like to do something like, although this just makes
> it a literal.
>
> label: "[attr1] ([attr2])";
>
> thanks,
> charles
>
>
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users