Thank you David,

It was the missing bracket - doh!

In reality im not really wanting to just join two strings, I was using that as 
a simple example to see if the CQL syntax was correct. I really need to be able 
to calculate the EC part of that example. Which is a simple calculation but I'm 
not sure how to represent the result (easily) in hexadecimal notation.

I believe that the font expects the required character to be specified as 
0x00?? Where the ?? is the number that I'm calculating (in decimal)

Does CQL have a function to convert decimal to hex?

From: David Winslow [mailto:dwins...@opengeo.org]
Sent: 15 May 2012 1:55 PM
To: Chris Haste
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Rookie Question

On Tue, May 15, 2012 at 8:02 AM, Chris Haste 
<cha...@airdata.co.uk<mailto:cha...@airdata.co.uk>> wrote:
Hi All,

I'm trying to get to grips with CQL...

Could someone please tell me why this doesn't work;
mark: symbol('ttf://ESRI Weather${strConcat("#0x00","EC"}');

If this is exactly what you have in your style then it is simply an invalid CQL 
expression: you need to close the parentheses before you close your ${} block:

   mark: symbol('ttf://ESRI Weather${strConcat("#0x00","EC")}');

By the way, strConcat is rarely, if ever, necessary in dynamic symbolizers. 
Instead of ${strConcat(prefix, suffix)} you can use the more concise 
${prefix}${suffix}.  So I would write your example as:

   mark: symbol('ttf://ESRI Weather${"#0x00"}${"EC"}');

There's one less level of nesting this way, and I think it's easier to count 
the braces.
--
David Winslow
OpenGeo - http://opengeo.org/
*** This communication has been sent from World Fuel Services 
Corporation or its subsidiaries or its affiliates for the intended recipient 
only and may contain proprietary, confidential or privileged information. 
If you are not the intended recipient, any review, disclosure, copying, 
use, or distribution of the information included in this communication 
and any attachments is strictly prohibited. If you have received this 
communication in error, please notify us immediately by replying to this 
communication and delete the communication, including any 
attachments, from your computer. Electronic communications sent to or 
from World Fuel Services Corporation or its subsidiaries or its affiliates 
may be monitored for quality assurance and compliance purposes.***

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to