[Mapserver-dev] New msCloneLayerObj() function
jhart at frw.uva.nl
Mon Feb 17 15:23:32 EST 2003
Sean Gillies wrote:
> int msCopyLayer(layerObj *dst, layerObj *src, mapObj *map);
> I picked the argument order to resemble memcpy(). The mapObj is
> needed as a final argument because the destination layer needs a
> pointer to it's parent map.
The layerObj struct already has a pointer to its parent map (as well as
to its own index in the map->layers array). Almost all bookkeeping you
need is already available. I discovered this when implementing
connection pooling; most of my original code could be discarded after that.
More information about the mapserver-dev