Add CDATA section parsing to SLD Labels and allow labels to be rendered as
multiline if they contain newline characters
-----------------------------------------------------------------------------------------------------------------------
Key: GEOT-1996
URL: http://jira.codehaus.org/browse/GEOT-1996
Project: GeoTools
Issue Type: Improvement
Components: core render, core styling
Affects Versions: 2.5-RC0
Reporter: Gabriel Roldán
Assignee: Gabriel Roldán
Fix For: 2.5.0
Hi, I've been looking at geoserver 1.6.5 issues to solve and found GEOS-1661
and GEOS-1620 and recall a thought that rounded my mind when this was
discussed.
The thing is, it _is_ by (xml) spec that spaces in a cssparameter element are
trimmed and also newlines, BUT what we were missing is that there IS a
standards compliant way to include whatever you want verbatim: a CDATA
section!
So I just modified the snippet in GEOS-1661 to use a CDATA secion with a new
line and added the CDATA parsing to SLDParser. The document validates and the
result is that the
expression goes down the pipe perfectly until the label needs to actually be
rendered, and then its rendered as a single line even if the expression
contained the newline character. That is due to the default implementation of
GlyphVector knowing how to draw text in a single line and a single font. The
way around is to use a java.awt.font.TextLayout instead.
But hey, the good news are we figured out how to include whatever you want in
the label, CDATA, and know how to fix the rendering...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel