<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Have you tried <br>
    <blockquote>unset($layer->labelitem);<br>
    </blockquote>
    <br>
    <div class="moz-signature"><b>Worth Lutz</b><br>
      <br>
      <br>
    </div>
    <div class="moz-cite-prefix">On 9/1/2015 6:08 AM, Geo-6 wrote:<br>
    </div>
    <blockquote cite="mid:1ea35e52389354719c941d2d269f3999@geo6.be"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <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 wrap="">_______________________________________________
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>
  </body>
</html>