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

PixelPusher pixelpusher at cox.net
Wed Apr 6 13:22:10 EDT 2011


Hmmm... interesting...

When I change to STATUS ON I get an error saying, "msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be valid for all requested layers."

At the top of each of the mapfiles used in this map, I define the projection as:
  PROJECTION
    "init=epsg:4269"
  END  

And that matches the srid for all of the layers.



---- Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi> wrote: 
> Hi,
> 
> I would first change the layer to have STATUS ON. Now you are giving ambiguous instructions "draw layer always" and "draw just at this scale range". It may be something else, though, but it does not cost much to try.
> 
> -Jukka Rahkonen-
> 
> PixelPusher wrote:
> 
> > 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
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 

--
-------------------------------------------------------
   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