[mapserver-users] PHP MapScript - Remove Layer labelitem/classitem
Geo-6
support at geo6.be
Tue Sep 1 05:25:33 PDT 2015
Hi,
Thanks for you answer.
I did try " unset($layer->labelitem); " but it didn't work. The layer
keep the previous value of " labelitem " when I "unset" it.
I forgot to tell that I use the Version 6.4.1 of MapScript PHP dll.
---
Jonathan Beliën
On 01.09.2015 13:01, Worth Lutz wrote:
> Have you tried
>
>> unset($layer->labelitem);
>
> WORTH LUTZ
>
> On 9/1/2015 6:08 AM, Geo-6 wrote:
>
>> Hi everyone,
>>
>> Probably a stupid question but I can't figure it out :
>>
>> I open a Layer through " $map->getLayer() " and I want to remove " labelitem " and " classitem" parameters.
>>
>> I tried to set these parameters to NULL " $layer->labelitem = NULL; " or " $layer->set('labelitem', NULL); " and to empty " $layer->labelitem = ''; " or " $layer->set('labelitem', ''); " but it doesn't remove the " LABELITEM " in the " LAYER " in the MapFile when I save the MapFile " $map->save() ".
>>
>> I found that setting an int/double parameter to -1 value removes it (like " maxscaledenom " or " minscaledenom ").
>>
>> How can I remove " labelitem " / " classitem " parameters ?
>>
>> Thanks a lot for your help !
>>
>> MapFile before MapScript :
>>
>> LAYER
>> NAME "test"
>> CLASSITEM "myclasscolumn"
>> LABELITEM "mylabelcolumn"
>> ...
>> END # LAYER
>>
>> MapFile after MapScript " $layer->set('labelitem', NULL); " and " $layer->set('classitem', NULL); " :
>>
>> LAYER
>> NAME "test"
>> CLASSITEM ""
>> LABELITEM ""
>> ...
>> END # LAYER
>>
>> --
>>
>> Jonathan Beliën
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users [1]
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users [1]
Links:
------
[1] http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150901/2da0cbcd/attachment.htm>
More information about the MapServer-users
mailing list