[mapserver-users] Dynamic Layers PHP/Mapscript

Jim Burnett jimburnett at ntelos.net
Wed Aug 15 07:55:54 PDT 2001


OK, I figured it out.

$mapObj = ms_newMapObj("$dataPath/$map.map");
$layerObj = $mapObj->getLayer(1);
$layerObj->set("status",1);   <---------------------------------------THIS LINE

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
I always seem to figure things out just after I post. HRM!  oh well, good for the archive

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


  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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010815/c78a79b6/attachment.htm>


More information about the MapServer-users mailing list