[mapserver-users] How to Turn off a Layer when other specific Layer is ON in a map file ?

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Nov 23 13:29:50 PST 2021


Hi Carlos,

I had a great answer drafted for you, tooting my own horn on the recent 
MapServer tutorial updates for MapServer 8.x, and the demo server 
updates...as by chance the tutorial mentions that the parameter 
"REQUIRES" at the LAYER level should do exactly what you need, super : 
but sadly my tests now fail with MapServer 8.0-dev, I cannot get 
REQUIRES to work, such as:

   LAYER
    ..
    REQUIRES "![modis]"
   END

  where modis is another layer name.

Since I hadn't been testing this feature, and it is only briefly 
mentioned in the tutorial (and not part of the live demo), I have no way 
of saying when this should have worked, for what MapServer version.  It 
is part of the tutorial mapfiles, but the functionality is not working, 
for my local tests.

But your question has made me see more room for improvement in the 
tutorial, and its mapfiles, so your question has helped.

Sorry for my non-news, ha.

I'll do more testing on this feature and report back.

-jeff



-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2021-11-23 3:45 p.m., Carlos Neves (LREC) wrote:
> Hi List,
> 
> It seems to be simple, but I can't find a way. How to turn off a Layer 
> in MAPSERVER when a specific Layer is ON in a MAP file?
> 
> Any Help would be appreciated.
> 
> Best Regards
> 
> Carlos
> 
> 
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 




More information about the MapServer-users mailing list