Jody Garnett wrote:
> Okay cool; so have you tried the text symbolizer offset yet? Setting an 
> offset should allow you to draw above or below the line. There is also a 
> rendering hint that can be used to make the text follow the line; I am 
> not sure if that only changes orientation or if it also would calculate 
> an offset?

Follow line hint only helps if you need your text to follow the shape
of a curved line, no help here.

Benoit, are you sure you set your AnchorX to 0.5? That's all you should
need to get you centering. If not, please create a bug report on 
jira.codehaus.org with a reproducable program that I can run to 
replicate and fix the bug.

For formatting text to 2 decimals we'd need a formatting filter
function, something that you could call like this:

<Function name="numberFormat">
   <PropertyName>myAtt</PropertyName>
   <Literal>###.##</Literal>
</Function>

to specify which attribute to use, and which pattern to use, 
respectively. As far as I remember there is no such a function,
but it's not hard to make one, just have a look at the filter
functions contained in the main module (e.g, FilterFunction_strLength),
and their SPI registration in META-INF/services (to have GeoTools
recognize them as plugins and thus don't throw and exception when
you try to create an instance of your function using the filter
factory).

Oh, if you make that one, it's kind of general use, so consider
contributing it back.

Cheers
Andrea

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to