[mapserver-users] removeLayer() in PHP MapScript
Daniel Morissette
dmorissette at mapgears.com
Mon Mar 10 14:00:38 PDT 2008
Armin Burger wrote:
> Hello
>
> I'd have a question for the PHP Mapscript developers: are there any
> plans to implement the removeLayer() method (that exists for SWIG
> Mapscript versions) also in PHP Mapscript?
I did a quick search and found an old ticket relating to that:
http://trac.osgeo.org/mapserver/ticket/762
... then I started to wonder why we never implemented removeLayer(), and
it came back to me that removeLayer() returns a standalone layerObj
that's decoupled from the mapObj and can even be reinserted into the map
at another location later on with insertLayer(). Without looking into
this in any detail, it sounds like adding this may be more involved than
just adding a new method since PHP MapScript doesn't allow decoupling
objects like this at the moment. That and the fact that there are
simpler alternatives to do the same thing (i.e. setting status
MS_DELETE) probably explains why we never did it.
> Setting the layer status to
> MS_DELETE is in most cases not an alternative since it seems to have
> effects only for writing the map object to a map file.
>
In which case does setting the status to MS_DELETE not work? That should
work for rendering, querying, etc.
Daniel
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list