PHP ms_newLayerObj vs SWIG layerObj

Ryan, Adam ARyan at CO.LINN.OR.US
Thu Sep 23 17:02:43 EDT 2004


Thanks for the update.  I can't think of a reason for cloning a layer other
than inserting into a map, so it may not be needed.  Don't know.

Thanks again,

Adam

-----Original Message-----
From: Sean Gillies [mailto:sgillies at frii.com]
Sent: Thursday, September 23, 2004 1:42 PM
To: Ryan, Adam
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: PHP ms_newLayerObj vs SWIG layerObj


On Sep 23, 2004, at 2:24 PM, Ryan, Adam wrote:

> Am I missing something simple?
>
> In PHP I'm able to take a layer from one map and add it to another map
> using
>
> ms_newLayerObj($map_object,$layer_object_from_another_map);
>
> Is there a way to do this with SWIG mapscript.  The layerObj method
> takes
> only one argument - the map.  Is there a clone() for layers or
> something
> like that?
>
> Adam

Adam,

Not in the 4.2 version.  In the 4.4 release, you'll be able to by using
mapObj::insertLayer which adds a copy of any layer to the map.  If you want
layerObj::clone in the next version, submit a request in Bugzilla and I'll
get around to it.

Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies



More information about the mapserver-users mailing list