[mapserver-users] PHP MapScript - Remove Layer labelitem/classitem

Worth Lutz wal3 at mindspring.com
Tue Sep 1 04:01:55 PDT 2015


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150901/00cc6243/attachment.html>


More information about the mapserver-users mailing list