<div dir="ltr">I have had the best luck with SCALETOKEN. Occasionally I'll have two layers: a and b which each set MINSCALEDENOM and MAXSCALEDENOM<div><div><a href="https://mapserver.org/mapfile/layer.html#index-52">https://mapserver.org/mapfile/layer.html#index-52</a><br></div></div><div><a href="https://mapserver.org/mapfile/layer.html#index-49">https://mapserver.org/mapfile/layer.html#index-49</a><br></div><div><br></div><div>Set the MINSCALEDENOM of one layer to the MAXSCALEDENOM of the other.  Then for the WMS request, set layers=a,b.</div><div><br></div><div>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`.</div><div><a href="https://mapserver.org/mapfile/layer.html#index-38">https://mapserver.org/mapfile/layer.html#index-38</a></div><div><br></div><div>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.</div><div><br></div><div>Cheers,</div><div>Pete</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2019 at 11:15 AM Travis Kirstine <<a href="mailto:traviskirstine@gmail.com">traviskirstine@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div>Would the scaletoken work</div><div><a href="https://mapserver.org/development/rfc/ms-rfc-86.html#rfc86" target="_blank">https://mapserver.org/development/rfc/ms-rfc-86.html#rfc86</a></div><div><br></div><div>Otherwise there is run time substitution</div><div><a href="https://mapserver.org/cgi/runsub.html" target="_blank">https://mapserver.org/cgi/runsub.html</a></div>

</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 8 Jul 2019 at 20:59, Ian Walberg <<a href="mailto:ian.walberg@airborne.aero" target="_blank">ian.walberg@airborne.aero</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-4499298996478398030gmail-m_4092980286857012380WordSection1">
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is there a way of making layers or features conditional on the image width and/or height?
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks, Ian<u></u><u></u></p>
</div>
</div>

_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Pete</div>