[Mapserver-users] getLayerByName phpMapscript
Daniel Morissette
dmorissette@dmsolutions.ca
Wed, 24 Mar 2004 10:50:01 -0500
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@dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users