<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p> </p>
<p>Hi,</p>
<p>Thanks for you answer.</p>
<p>I did try " unset($layer->labelitem); " but it didn't work. The layer keep the previous value of " labelitem " when I "unset" it.</p>
<p>I forgot to tell that I use the Version 6.4.1 of MapScript PHP dll.</p>
<p> </p>
<div>---<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Jonathan Beliën</div>
</div>
<p> </p>
<p>On 01.09.2015 13:01, Worth Lutz wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><br /> Have you tried <br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">unset($layer->labelitem);</blockquote>
<br />
<div class="moz-signature"><strong>Worth Lutz</strong><br /><br /><br /></div>
<div class="moz-cite-prefix">On 9/1/2015 6:08 AM, Geo-6 wrote:</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<p> </p>
<p>Hi everyone,</p>
<p>Probably a stupid question but I can't figure it out :</p>
<p>I open a Layer through " <span class="x">$map->getLayer() " and I want to remove " labelitem " and " classitem" parameters.<br /></span></p>
<p><span class="x">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() ".</span></p>
<p><span class="x">I found that setting an int/double parameter to -1 value removes it (like " maxscaledenom " or " minscaledenom ").</span></p>
<p><span class="x">How can I remove " labelitem " / " classitem " parameters ?</span></p>
<p><span class="x">Thanks a lot for your help !</span></p>
<p> </p>
<p> </p>
<p><span class="x">MapFile before MapScript :</span></p>
<pre><span style="font-family: courier new,courier,monospace;">LAYER</span>
<span style="font-family: courier new,courier,monospace;">    NAME "test"
    CLASSITEM "myclasscolumn"
    LABELITEM "mylabelcolumn"
    ...
END # LAYER</span></pre>
<div> </div>
<div><span class="x">MapFile after MapScript " $layer->set('labelitem', NULL); " and " $layer->set('classitem', NULL); " :</span></div>
<div> </div>
<div>
<pre><span style="font-family: courier new,courier,monospace;">LAYER</span>
<span style="font-family: courier new,courier,monospace;">    NAME "test"
    CLASSITEM ""
    LABELITEM ""
    ...
END # LAYER</span></pre>
</div>
<div> </div>
<div>-- <br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace;">Jonathan Beliën</div>
</div>
<p> </p>
<br /><fieldset class="mimeAttachmentHeader"></fieldset><br />
<pre>_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></pre>
</blockquote>
<br /><!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> mapserver-users mailing list<br /><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br /><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></div>
</blockquote>
</body></html>