[mapserver-users] PHP/Mapscript CLASS TEXT
Charlotte Declercq
c.declercq at alkante.com
Mon Jun 29 00:20:03 PDT 2009
Daniel Morissette a écrit :
> Charlotte Declercq wrote:
>>
>> With TEXT = " ", the layer is drawn without the labels. If TEXT
>> property is present, I am unable to draw the labels,
>> because I can't remove the TEXT property and I can't find a way to
>> write TEXT [attribute_name] with mapscript (do the binding as for
>> example $oStyle->setbinding(MS_STYLE_BINDING_SIZE, "FIELD_NAME")).
>>
>> Anyone has solution :
>> - to remove the TEXT property ?
>
> I don't think there is a way to remove the text property with the
> current version. Could you please file a ticket and we'll try to fix
> that in the next release? It will likely be done by calling
> $class->setText(null)
>
>> - to set the TEXT property with the attribute ?
>>
>
> The following should work:
>
> $class->setText("([FIELD_NAME])");
>
> Okay, I'll admit that was not obvious. The TEXT parameter works
> differently from regular attribute binding. It actually goes through
> the logical expression parser, that's why there is a special setTExt()
> method and the round brackets are required.
>
> Daniel
Thanks a lot,
$class->setText("([FIELD_NAME])");
is working !
--
Charlotte DECLERCQ
ALKANTE SAS
Ingénieur R&D SIG
1, rue du Chêne Morand
35 510 Cesson-Sévigné
Bur: + 33 (0) 2 99 22 25 70
fax : + 33 (0) 2 99 32 12 76
More information about the MapServer-users
mailing list