I have had the best luck with SCALETOKEN. Occasionally I'll have two layers: a and b which each set MINSCALEDENOM and MAXSCALEDENOM https://mapserver.org/mapfile/layer.html#index-52 https://mapserver.org/mapfile/layer.html#index-49
Set the MINSCALEDENOM of one layer to the MAXSCALEDENOM of the other. Then for the WMS request, set layers=a,b. You can use two layers with the MINSCALEDENOM/MAXSCALEDENOM and add "GROUP c" to each layer. Then you can make a single request for `layers=c`. https://mapserver.org/mapfile/layer.html#index-38 One downside with using GROUP: Some metadata, like extents, are not calculated correctly with a GROUP. SCALETOKEN with runtime substitution seems to have largely solved this problem for me. Cheers, Pete On Tue, Jul 9, 2019 at 11:15 AM Travis Kirstine <traviskirst...@gmail.com> wrote: > Would the scaletoken work > https://mapserver.org/development/rfc/ms-rfc-86.html#rfc86 > > Otherwise there is run time substitution > https://mapserver.org/cgi/runsub.html > > On Mon, 8 Jul 2019 at 20:59, Ian Walberg <ian.walb...@airborne.aero> > wrote: > >> Hello, >> >> >> >> Is there a way of making layers or features conditional on the image >> width and/or height? >> >> >> >> We are trying to use the same map file for different resolution images >> generated by passing the image with and height as part of the cgi request. >> >> >> >> Thanks, Ian >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Pete
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users