php_mapscript - showing polygon and point/annotation layers

robert fritz robert-fritz at WEB.DE
Wed Aug 24 03:19:00 EDT 2005



Hi Mike,

If you want to draw some specific layers you can try this ::

1) Switch off all Layers
function setAllLayerOff($MapObject)
{ 
 $layers = $MapObject->getAllLayerNames(); 
 for($a=0;$a<count($layers);$a++)
 {
 $tmp = $MapObject->getlayerbyname($layers[$a]);
 $tmp->set("status",0);
 }
}

2) Switch on the layers you want to see in your map

....
$layer_on = $MapObject->getlayerbyname($layername);
$layer_on->set("status",1); 

......


3) Draw the map and save it

$objImage=$objMap->draw();
$image_url=$objImage->saveWebImage(); 



Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle 
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179 
 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050824/0ad4983f/attachment.html


More information about the mapserver-users mailing list