No subject
Mon Oct 7 05:54:23 PDT 2024
finds the layer, and FALSE if it doesn't. I'm getting FALSE AND a
warning message.
=20
code snippit:
=20
//returns the layer object ok.
$oLayer =3D $oMap->getLayerByName("validlayername");
=20
//retuns FALSE and error
$oLayer =3D $oMap->getLayerByName("notvalidlayer");
=20
Warning: getLayerByName failed for : notvalidlayer in ...
=20
Thanks,
=20
Liz Godwin
------_=_NextPart_001_01C5031B.41A89D68
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1479" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D201091020-25012005>Hello,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D201091020-25012005></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005>I've =
been trying to=20
use getLayerByName function and it's returning a warning when I use=20
it. I just want to verify if I am doing something wrong, =
before I=20
file a bug, if it's a bug. I've tried this on 4.2, 4.4 and =
CVS from a=20
week ago, all yield the same warning.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D201091020-25012005></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005>From =
what I=20
understand, the function returns the layer object if it finds the layer, =
and=20
FALSE if it doesn't. I'm getting FALSE <STRONG>AND</STRONG> a =
warning=20
message.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D201091020-25012005></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D201091020-25012005><U>code=20
snippit:</U></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D201091020-25012005></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D201091020-25012005>//returns the layer=20
object ok.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D201091020-25012005>$oLayer =3D=20
$oMap->getLayerByName("validlayername");</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D201091020-25012005></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D201091020-25012005>//retuns FALSE and=20
error</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005><SPAN=20
class=3D201091020-25012005>$oLayer =3D=20
$oMap->getLayerByName("notvalidlayer");</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005><SPAN=20
class=3D201091020-25012005></SPAN></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=3D201091020-25012005><SPAN =
class=3D201091020-25012005><!--StartFragment --> <B>Warning</B>:=20
getLayerByName failed for : notvalidlayer in =
...</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005><SPAN=20
class=3D201091020-25012005></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005><SPAN=20
class=3D201091020-25012005>Thanks,</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005><SPAN=20
class=3D201091020-25012005></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D201091020-25012005><SPAN=20
class=3D201091020-25012005>Liz =
Godwin</SPAN></SPAN></FONT></DIV></BODY></HTML>
------_=_NextPart_001_01C5031B.41A89D68--
More information about the MapServer-users
mailing list