split two labels

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

split two labels

Humberto Cereser Ibanez
Hi,

I want to show two labels, one to the left (LL) and another one to the right (LR), separate for a hyphen.

Is there a way to visually split two labels?

example 123 - 4

Thanks

Humberto Cereser Ibanez
Pastoral da Criança
Curitiba - PR
Reply | Threaded
Open this post in threaded view
|

Re: split two labels

Michael Schulz
Hi,

not sure, if I understood the question correctly, but you can label
one point with several attribute values, using the TEXT keyword in the
class section of your mapfile:
TEXT ([ATTRIBUTE1] - [ATTRIBUTE2])

I don't think you can actually define 2 labelpositions within one
layer. But you could use one layer to show the geometry with one label
and e.g. an annotation layer for the other attribute label.

HTH, Michael


On 11/14/06, Humberto Cereser Ibanez <[hidden email]> wrote:

> Hi,
>
> I want to show two labels, one to the left (LL) and another one to the right (LR), separate for a hyphen.
>
> Is there a way to visually split two labels?
>
> example 123 - 4
>
> Thanks
>
> Humberto Cereser Ibanez
> Pastoral da Criança
> Curitiba - PR
>


--
-----------------------------------------------------------
Michael Schulz
[hidden email]

in medias res
Gesellschaft für Informationstechnologie mbH

In den Weihermatten 66
79108 Freiburg

Tel  +49 (0)761 556959-5
Fax +49 (0)761 556959-6

http://www.webgis.de / http://www.zopecms.de
-----------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: split two labels

Humberto Cereser Ibanez
Problem solved.

Tanks to Michael and sorry for my poor English.

LAYER
        NAME nexames
        GROUP "Nº Exames - Mutações"
        TYPE ANNOTATION
        CONNECTIONTYPE postgis
        CONNECTION "user=humberto dbname=mutacaoP53 host=localhost"
        DATA "the_geom from parana"
        PROJECTION
                "init=epsg:4291"
        END
        STATUS On
        LABELITEM "exames"
        CLASSITEM "exames"
        CLASS
                TEXT ([exames] - [mutacoes])
                EXPRESSION  /./
                COLOR -1 -1 -1
                LABEL
                        COLOR 0 0 0
                        OUTLINECOLOR 202 202 202
                        SHADOWCOLOR 202 202 202
                        TYPE TRUETYPE
                        FONT "sans"
                        ANTIALIAS TRUE
                        SIZE 6
                        POSITION lc
                        PARTIALS false
                END

        END
        TOLERANCE 0
        TOLERANCEUNITS meters
END     # Layer nexames

Humberto Cereser Ibanez

De: "Michael Schulz" <[hidden email]>
Data: Tue, 14 Nov 2006 11:51:16 +0100
Para: "Humberto Cereser Ibanez" <[hidden email]>
Assunto: Re: [UMN_MAPSERVER-USERS] split two labels

Hi,

not sure, if I understood the question correctly, but you can label
one point with several attribute values, using the TEXT keyword in the
class section of your mapfile:
TEXT ([ATTRIBUTE1] - [ATTRIBUTE2])

I don't think you can actually define 2 labelpositions within one
layer. But you could use one layer to show the geometry with one label
and e.g. an annotation layer for the other attribute label.

HTH, Michael


On 11/14/06, Humberto Cereser Ibanez <[hidden email]> wrote:

> Hi,
>
> I want to show two labels, one to the left (LL) and another one to the right (LR), separate for a hyphen.
>
> Is there a way to visually split two labels?
>
> example 123 - 4
>
> Thanks
>
> Humberto Cereser Ibanez
> Pastoral da Criança
> Curitiba - PR
>


--
-----------------------------------------------------------
Michael Schulz
[hidden email]

in medias res
Gesellschaft für Informationstechnologie mbH

In den Weihermatten 66
79108 Freiburg

Tel  +49 (0)761 556959-5
Fax +49 (0)761 556959-6

http://www.webgis.de / http://www.zopecms.de
-----------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: split two labels

David Percy
In reply to this post by Michael Schulz
Can you use that same keyword to label something with "boilerplate"
text, like
TEXT ("Route number: "[route_num])

One of my students was trying to get something like this working
yesterday, and I thought it should be possible...
Thx,
Percy

Michael Schulz wrote:

> Hi,
>
> not sure, if I understood the question correctly, but you can label
> one point with several attribute values, using the TEXT keyword in the
> class section of your mapfile:
> TEXT ([ATTRIBUTE1] - [ATTRIBUTE2])
>
> I don't think you can actually define 2 labelpositions within one
> layer. But you could use one layer to show the geometry with one label
> and e.g. an annotation layer for the other attribute label.
>
> HTH, Michael
>
>
> On 11/14/06, Humberto Cereser Ibanez
> <[hidden email]> wrote:
>> Hi,
>>
>> I want to show two labels, one to the left (LL) and another one to
>> the right (LR), separate for a hyphen.
>>
>> Is there a way to visually split two labels?
>>
>> example 123 - 4
>>
>> Thanks
>>
>> Humberto Cereser Ibanez
>> Pastoral da Criança
>> Curitiba - PR
>>
>
>
Reply | Threaded
Open this post in threaded view
|

static and dynamic text mixed in labels

David Percy
Can you use the TEXT keyword to label something with "boilerplate" text,
like TEXT ("Route number: "[route_num])

One of my students was trying to get something like this working
recently, and I thought it should be possible...
Thx,
Percy
--
David Percy
Geospatial Data Manager
Geology Department
Portland State University
http://gisgeek.pdx.edu
503-725-3373
Reply | Threaded
Open this post in threaded view
|

Re: static and dynamic text mixed in labels

Dylan Keon-3
On 11/22/2006 06:53 AM percy wrote the following:
> Can you use the TEXT keyword to label something with "boilerplate" text,
> like TEXT ("Route number: "[route_num])
>
> One of my students was trying to get something like this working
> recently, and I thought it should be possible...
> Thx,
> Percy

Hi Percy,

TEXT (Route number: [route_num]) works for me.

--Dylan
Reply | Threaded
Open this post in threaded view
|

Re: static and dynamic text mixed in labels

David Percy
no way! I didn't even BOTHER trying it without quotes,
Thanks Corvallis ;-)

Dylan Keon wrote:

> On 11/22/2006 06:53 AM percy wrote the following:
>> Can you use the TEXT keyword to label something with "boilerplate"
>> text, like TEXT ("Route number: "[route_num])
>>
>> One of my students was trying to get something like this working
>> recently, and I thought it should be possible...
>> Thx,
>> Percy
>
> Hi Percy,
>
> TEXT (Route number: [route_num]) works for me.
>
> --Dylan
>
>

--
David Percy
Geospatial Data Manager
Geology Department
Portland State University
http://gisgeek.pdx.edu
503-725-3373