[mapserver-users] Layer - conditional on image size

Peter Schmitt pschmitt at gmail.com
Tue Jul 9 12:21:05 PDT 2019


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 <traviskirstine at 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.walberg at 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 at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



-- 
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190709/00df4894/attachment.html>


More information about the mapserver-users mailing list