[Mapserver-users] setting layers on/off using phpmapscript
Geoffrey Rowland
geoffrey.rowland at noaa.gov
Tue Sep 9 09:40:01 PDT 2003
This is a multi-part message in MIME format.
--------------000704060503040107020701
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
If I change it to a string, then I get the error
Fatal error: Call to a member function on a non-object in
D:\Inetpub\rootbeta\map_engine\wnvfetchmap.php on line 11
Vinko Vrsalovic wrote:
>On Tue, Sep 09, 2003 at 11:31:20AM -0400, Geoffrey Rowland wrote:
>
>
>
>>Am I doing something wrong? The following code gives me an error.
>>Since I don't have 78 lines of code in my php file, I'm assuming
>>something in my .map file may be causing this error. However if I take
>>out the php code trying to set the layer status, the map will render fine.
>>
>>Fatal error: Object expected as argument. in
>>D:\Inetpub\rootbeta\map_engine\wnvfetchmap.php on line 78
>>
>> $myMap = ms_newMapObj("wnv.map");
>> $countyLayer = $myMap->getlayerbyname(counties);
>>
>>
>
> $countyLayer = $myMap->getlayerbyname('counties'); <-- As STRING
>
>
>
--
Geoffrey Rowland
Technical Officer
Climate Information Project
NOAA Research
Office of Global Programs
http://www.cip.ogp.noaa.gov
Contractor,
RGII Technologies, Inc., a Computer Horizons Company
http://www.rg2.com
Phone: 301-427-2089x186
Fax : 301-427-2082
geoffrey.rowland at noaa.gov
--------------000704060503040107020701
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
If I change it to a string, then I get the error<br>
<b>Fatal error</b>: Call to a member function on a non-object in <b>D:\Inetpub\rootbeta\map_engine\wnvfetchmap.php</b>
on line <b>11</b><br>
<br>
<br>
Vinko Vrsalovic wrote:<br>
<blockquote type="cite"
cite="mid20030909163629.GA6268 at landsat.cprsig.cl">
<pre wrap="">On Tue, Sep 09, 2003 at 11:31:20AM -0400, Geoffrey Rowland wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Am I doing something wrong? The following code gives me an error.
Since I don't have 78 lines of code in my php file, I'm assuming
something in my .map file may be causing this error. However if I take
out the php code trying to set the layer status, the map will render fine.
Fatal error: Object expected as argument. in
D:\Inetpub\rootbeta\map_engine\wnvfetchmap.php on line 78
$myMap = ms_newMapObj("wnv.map");
$countyLayer = $myMap->getlayerbyname(counties);
</pre>
</blockquote>
<pre wrap=""><!---->
$countyLayer = $myMap->getlayerbyname('counties'); <-- As STRING
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Geoffrey Rowland
Technical Officer
Climate Information Project
NOAA Research
Office of Global Programs
<a class="moz-txt-link-freetext" href="http://www.cip.ogp.noaa.gov">http://www.cip.ogp.noaa.gov</a>
Contractor,
RGII Technologies, Inc., a Computer Horizons Company
<a class="moz-txt-link-freetext" href="http://www.rg2.com">http://www.rg2.com</a>
Phone: 301-427-2089x186
Fax : 301-427-2082
<a class="moz-txt-link-abbreviated" href="mailto:geoffrey.rowland at noaa.gov">geoffrey.rowland at noaa.gov</a>
</pre>
</body>
</html>
--------------000704060503040107020701--
More information about the MapServer-users
mailing list