[mapserver-users] How to show/hide labels?

Daniel Morissette morissette at dmsolutions.ca
Wed Nov 14 13:04:58 PST 2001


Greg Liapis wrote:
> 
> Hi all,
> I am new to map server and this question may seem a little silly.
> Is there a method in PHP/Mapscript to show or hide labels dynamically?
> Thanks.
> 

There is no way to set STATUS OFF on labels explicitly, but there are a
few tricks you can do, like setting LABELITEM to an empty or invalid
value... (e.g.  $layer->set("labelitem", "") ) ... since there won't be
any label value then the labels won't show up.  You could also try
setting LABELMAXSCALE to a very small value...

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.



More information about the MapServer-users mailing list