[mapserver-users] displaying layers
Ivan Paoluzzi
tesimap@hotmail.com
Wed, 30 Oct 2002 22:14:44 +0100
Hi all,
I have this two layer with raster images.
LAYER
NAME foto
DATA "185160w.tif"
TYPE RASTER
MAXSCALE 50000
STATUS OFF
END
LAYER
NAME foto1
DATA "185120w.tif"
TYPE RASTER
MAXSCALE 50000
STATUS OFF
END
I use PHP/Mapscript an this is the section where I set STATUS if it's choose
with radio button in PHTML file.
$outLayer = $outMap->getlayerbyname(foto);
if ($HTTP_FORM_VARS["foto"])
$outLayer->set("status", 1);
else
$outLayer->set("status", 0);
$outLayer = $outMap->getlayerbyname(foto1);
if ($HTTP_FORM_VARS["foto1"])
$outLayer->set("status", 1);
else
$outLayer->set("status", 0);
And this is function taht return if layer is choose or not with radio button
in a PHTML file.
function GetStatus($szLayerName)
{
GLOBAL $outMap;
$outLayer = $outMap->getlayerbyname($LayerName);
$nStatus = $outLayer->status;
return ($nStatus);
}
This method is very similar that used in Gmap demo.
So I have a radio button for each layer, but I want an only for each.
I can use GROUP in map file and GetLayersIndexByGroup, but I have a problem.
Any suggestion?
Ivan
_________________________________________________________________
Comunica in un ’altra dimensione con MSN Extra Storage!
http://www.msn.it/msnservizi/es/