[mapserver-users] PHP MapScript - Remove Layer labelitem/classitem
Geo-6
support at geo6.be
Tue Sep 1 03:08:07 PDT 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150901/000951e2/attachment.htm>
More information about the MapServer-users
mailing list