[mapserver-users] how do min/max scale filters work?

PixelPusher pixelpusher at cox.net
Wed Apr 6 09:10:33 EDT 2011


I’ve got a simple thing in a MapServer page that doesn’t want to work. There is a layer in my map that I only want displayed if the scale of the view is between 1:24000 and 1:100000. However, I’ve had no luck using the MAXSCALEDENOM and MINSCALEDENOM keywords. As configured below, the layer never draws, regardless of the scale. The layer draws correctly if I comment out the scale tests. Can anyone show me the correct way to use this?

The relevant section of the mapfile looks like this:

    LAYER
        NAME "BTSroads_local_PostGIS"
        TYPE LINE
        STATUS DEFAULT
        MAXSCALEDENOM 100000
        MINSCALEDENOM 24000
        CONNECTIONTYPE POSTGIS
        CONNECTION "dbname=mapserver user=uuuu password=pppp port=5432"
        DATA "wkb_geometry from btsroads using unique ogc_fid using srid=4269"
        FILTER "fcc LIKE 'A4%'"
        CLASS
            NAME "Local Roads"
            STYLE
                COLOR 220 214 196
            END
        END
    END # layer

Thanks,
Thom

--
-------------------------------------------------------
   Man will occasionally stumble over the truth, but most of the time
   he will pick himself up and continue.              -- Winston Churchill


More information about the mapserver-users mailing list