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

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Nov 23 13:42:36 PST 2021


Hi Jeff,

I know REQUIRES has worked in a positive way (show copyright when a layer is on) because I have used that feature but I do not admin that service any more and I can't check the details. Probably I used version 6.x then.

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: MapServer-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Jeff McKenna
Lähetetty: tiistai 23. marraskuuta 2021 23.35
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] How to Turn off a Layer when other specific Layer is ON in a map file ?

To give a more detailed example of what *should* work:

   LAYER
     ..
     REQUIRES "![modis] OR ![someotherlayername]"
   END

I'll continue my 8.0-dev testing...


-jeff



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


On 2021-11-23 5:29 p.m., Jeff McKenna wrote:
> 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
> 
> 
> 

_______________________________________________
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