[Mapserver-users] getLayerByName phpMapscript
Daniel Morissette
dmorissette at dmsolutions.ca
Wed Mar 24 07:50:01 PST 2004
Stéphane RIFF wrote:
> I'd like to add dynamically a layer to my map only and only if that
> layer doesn't already exist.
>
> The problem is : getLayerByName returns a layerObject if the layer exist
> but if it doesn't exist the function
> terminate the script and print the error. So i try with '@' to stop
> error message but the script still die on getLayerByName.
>
Which version of MapServer are you using? 3.6.x? getLayerByName() was
changed in version 4.0 to produce only a warning that can be trapped
with '@'. If you are using 4.0 and still get that error then please
file a bug about this in bugzilla.
Daniel
--
------------------------------------------------------------
Daniel Morissette dmorissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list