[Geoserver-users] Problems with whitespaces and newlines in labels hopefully solved

Hi,
today I landed enough patches to the GeoTools renderer
and SLD parser that the problems cited in the subject
should have gone the way of the dodo.

Starting from tomorrow you can grab a GeoServer nightly
from http://gridlock.openplans.org/geoserver/1.7.x/
(today's build do not have the patches).

For some hints on how to insert newlines and the like
see here:
http://geoserver.org/display/GEOSDOC/LabelingOptions
(look for the "Composing labels from multiple attributes"
paragraph).

I know a number of you have been affected by these
issues this week alone. Let me know if it works as expected.

Cheers
Andrea

PS: Ivan, Mike, I've cc'ed you in case you want to
review the docs.

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi all,

Using the new GeoServer nightly with the labeling option regarding whitespaces that has just been implemented, I noticed a problem. Now, a white space is inserted between two property names, what is very useful in case you want to label the type of thoroughfare and its name, for example, but sometimes that white space is not necessary, e.g. if you want to label two property names one close to another or if you want to include a literal before or after a property name. Is it possible to do this in the new version?

Thanks,

Jose Miguel

-----Mensaje original-----
De: Andrea Aime [mailto:aaime@anonymised.com]
Enviado el: jueves, 05 de febrero de 2009 18:07
Para: geoserver users; Mike Pumphrey; Ivan Willig
Asunto: [Geoserver-users] Problems with whitespaces and newlines in labels hopefully solved

Hi,
today I landed enough patches to the GeoTools renderer
and SLD parser that the problems cited in the subject
should have gone the way of the dodo.

Starting from tomorrow you can grab a GeoServer nightly
from http://gridlock.openplans.org/geoserver/1.7.x/
(today's build do not have the patches).

For some hints on how to insert newlines and the like
see here:
http://geoserver.org/display/GEOSDOC/LabelingOptions
(look for the "Composing labels from multiple attributes"
paragraph).

I know a number of you have been affected by these
issues this week alone. Let me know if it works as expected.

Cheers
Andrea

PS: Ivan, Mike, I've cc'ed you in case you want to
review the docs.

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Rubio Iglesias José Miguel ha scritto:

Hi all,

Using the new GeoServer nightly with the labeling option regarding
whitespaces that has just been implemented, I noticed a problem. Now,
a white space is inserted between two property names, what is very
useful in case you want to label the type of thoroughfare and its
name, for example, but sometimes that white space is not necessary,
e.g. if you want to label two property names one close to another or
if you want to include a literal before or after a property name. Is
it possible to do this in the new version?

So you wrote something like:

<Label><ogc:PropertyName>p1</ogc:PropertyName><ogc:PropertyName>p2</ogc:PropertyName></Label>

(all in one line, maybe the mail client with wrap it)

and you get a white space between the values of p1 and p2?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Oh! I'm sorry, it works!

I had written something like this:

<Label>
<ogc:PropertyName>p1</ogc:PropertyName>
<ogc:PropertyName>p2</ogc:PropertyName>
</Label>

That is, each property name in a different line, so I got a white space between both values. In one line there is no white space, as I wanted.

Thanks Andrea

Jose

-----Mensaje original-----
De: Andrea Aime [mailto:aaime@anonymised.com]
Enviado el: martes, 10 de febrero de 2009 11:52
Para: Rubio Iglesias José Miguel
CC: geoserver users
Asunto: Re: [Geoserver-users] Problems with whitespaces and newlines in labels

Rubio Iglesias José Miguel ha scritto:

Hi all,

Using the new GeoServer nightly with the labeling option regarding
whitespaces that has just been implemented, I noticed a problem. Now,
a white space is inserted between two property names, what is very
useful in case you want to label the type of thoroughfare and its
name, for example, but sometimes that white space is not necessary,
e.g. if you want to label two property names one close to another or
if you want to include a literal before or after a property name. Is
it possible to do this in the new version?

So you wrote something like:

<Label><ogc:PropertyName>p1</ogc:PropertyName><ogc:PropertyName>p2</ogc:PropertyName></Label>

(all in one line, maybe the mail client with wrap it)

and you get a white space between the values of p1 and p2?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Rubio Iglesias José Miguel ha scritto:

Oh! I'm sorry, it works!

I had written something like this:

<Label>
<ogc:PropertyName>p1</ogc:PropertyName>
<ogc:PropertyName>p2</ogc:PropertyName>
</Label>

That is, each property name in a different line, so I got a white space between both values. In one line there is no white space, as I wanted.

Yeah, according to the specification all white spaces in the
middle of two expressions must be turned into a single " ",
where white space is considered to be " ", tabs and newlines.

So if you don't want spaces at all, you have to make sure there
is absolutely none, as you already did. Thanks for letting me
know it works.
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.