[mapserver-users] RE: multiple map layers with different scales

easyl thlin.box at gmail.com
Fri Jul 16 01:51:33 PDT 2010


does it mean that I should also always give "SCALEDENOM" in the CGI request?

I tries to set MAX/MINSCALEDENOM for each layer and to use SCALEDENOM in CGI
request.
But it works just other than what I expect.

The maps (layers) what I have have a real map scale value (e.g. 1:250,000).
The maps have different detail according to different scales.

1) At first I tried WITHOUT MAX/MINSCALEDENOM
in mapfile:
 LAYER
    NAME LAYER_SCALE_1500000
    STATUS ON
    TYPE POLYGON
    #MINSCALEDENOM 350001
    CONNECTIONTYPE OGR
    CONNECTION "layer.shp"
    DATA "layer"
    ...
  END
and with CGI request:
/cgi-bin/mapserv?LAYERS=ALL&MODE=MAP&MAP=/my.map&MAPXY=10+50&SCALEDENOM=1
The map is shown and it looks OK.

then I tried with this CGI request:
/cgi-bin/mapserv?LAYERS=ALL&MODE=MAP&MAP=/my.map&MAPXY=10+50&SCALEDENOM=20
then the map is still shown but its size is decreased (it should be 20x
smaller than that with SCALEDENOM=1)

does SCALEDENOM mean the "actual" map scale or is it just for mapserver to
zoom in/out?

2) if I try using the CGI request with the "actual" map scale:
/cgi-bin/mapserv?LAYERS=ALL&MODE=MAP&MAP=/my.map&MAPXY=10+50&SCALEDENOM=1500000
then the map will be so small that it will be never shown or seen!

and it would make no sense to define MAX/MINSCALEDENOM for layers with
actual scale value.
 LAYER
    NAME LAYER_SCALE_1500000
    STATUS ON
    TYPE POLYGON
    MINSCALEDENOM 350001
    CONNECTIONTYPE OGR
    CONNECTION "layer.shp"
    DATA "layer"
    ...
  END


How should I correctly use those parameters?
must I always use MAPXY with SCALEDENOM in CGI request?
Can I define MAPEXT with SCALEDENOM to defined explicit bounding box? how
about MAPSIZE or BUFFER?
I want to use different scale value to show different map layer, and the
zoom (in/out) effect is somehow done in client application.

thanks for your help.



-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/multiple-map-layers-with-different-scales-tp5292120p5301056.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list