Andrea Aime wrote: > Saul Farber ha scritto: > >> Great question! I'm not sure I have an answer...anyone else have any >> great ideas? >> >> I guess you could do some math in the <size> of the box. Have it be >> dependent on the length of the name string. Anyone know how Hugo could >> formulate that SLD expression? <size><Mult><Func >> name="length">STREET_NAME</Func><Literal>20</Literal></Mult></size >> >> Is there a function to get the length of a string attribute? >> > > strLength(attribute) does compute the number of chars. > Yet I'm not sure it's what you want, since the rendered width > of "MMMM" and "||||" is different. > Unfortunately afaik we do not have a function that does return > actual rendered width and height. > > In fact, to provide a proper answer to this problem, a new > element similar to halo should be added to TextSymbolizer, > since it has the same function as a halo, that is, make > text easier to read... well, it could even be a Halo > new attribute. > Both would require changing published API in 2.2.x, so I'm > not sure we're speaking about a quick change (I doubt it... > everything handling styles would need to be changed as > an effect, parsers, encoders, implementations of the interface...) > We do support optional extensions beyond the SLD specification, for example we did "label shields" where a Mark could be dropped in behind the final text position. This box sounds like a similar idea.
Jody ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
