[mapserver-users] mapfile help
Hankley, Chip
Chip.Hankley at GASAI.Com
Wed Sep 26 06:23:26 PDT 2001
I see that you don't have a STATUS line for any of your layers. I don't know
if STATUS is required... but I use it, and my stuff is working! ;)
You might try starting off with your layers as off or default. Then turn
them ON with mapscript. You might also try turning off your scale limits
while you're debugging.
Here's a layer definition from one of my mapfiles:
LAYER
NAME "OrthoPhoto"
DATA "S:\PROJECTS\20000156\images\lp_bw6.tif"
STATUS OFF
MAXSCALE 8000
OFFSITE 0
TYPE RASTER
END
...on the PHP side, I'm controlling visibility like this:
$Layer = $map->getlayerbyname("OrthoPhoto");
if (($HTTP_POST_VARS['OrthoPhoto']) AND ($map->scale < 8000))
$Layer->set("status", 1);
else
$Layer->set("status", 0);
Hope this helps.
Chip
More information about the MapServer-users
mailing list