[mapserver-users] Dynamic Layers PHP/Mapscript

Jim Burnett jimburnett at ntelos.net
Wed Aug 15 10:22:06 EDT 2001


I just figured that out. LOL
I always post a mesasge, then figure it our like just a few minutes after I post. Gosh! :-)


-jim


  ----- Original Message ----- 
  From: Assefa Yewondwossen 
  To: Jim Burnett 
  Cc: mapserver-users at lists.gis.umn.edu 
  Sent: Wednesday, August 15, 2001 9:59 AM
  Subject: Re: [mapserver-users] Dynamic Layers PHP/Mapscript


  Hi there, 
    
   You should use something like this : 
     .... 
     $layerObj = $mapObj->getLayer(1); 
     $layerObj->set("status", 1); 
     .... 

  Bye, 

  Jim Burnett wrote: 

    Hi, I am running mapserver 3.5(night build), with PHP/Mapscript.I was wondering how to turn a layer on, before it gets displayed to my browser. I have 3 layers in my map file. Layers 0 and 2 have "status on"  Layer 1 has "status off". Here is what I am trying...I am turning the status of my 2nd layer to "on" but it still doesnt show up.    $mapObj = ms_newMapObj("$dataPath/$map.map"); 
    $layerObj = $mapObj->getLayer(1); 
    $layerObj->status=1;header("Cache-Control: no-cache, must-revalidate"); 
    header("Pragma: no-cache"); 
    header("content-type: image/jpeg"); 
    $img->saveImage("",MS_JPEG,0,0, 80);  thanks!! -jim 
  -- 
  ---------------------------------------------------------------- 
  Assefa Yewondwossen 
  Software Analyst 

  Email: assefa at dmsolutions.ca 
  http://www.dmsolutions.ca/ 

  Phone: (613) 565-5056 
  ---------------------------------------------------------------- 
    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010815/2cd233fb/attachment.html


More information about the mapserver-users mailing list