[Mapserver-users] setting layers on/off using phpmapscript

Vinko Vrsalovic vinko at cprsig.cl
Tue Sep 9 12:36:29 EDT 2003


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

-- 
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl



More information about the mapserver-users mailing list