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

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Jul 20 08:49:17 EDT 2010


The mode=tile request results in an extent along with a default tile size of 256x256. With those you can compute a scale and
then hold layers to whatever scale bounds that have been set.

You can't combine extent, scale and size (by default set in the mapfile) though, MapServer's not setup that way. You can however
combine a point, scale (given by the SCALE parameter) and a size. In that case MapServer will compute the appropriate extent.

Steve
________________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] On Behalf Of easyl [thlin.box at gmail.com]
Sent: Tuesday, July 20, 2010 7:37 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Re: multiple map layers with different scales

I found another interesting thing with mode=tile.

I set layers with different MAX/MINSCALEDENOM in map file and used (google
map) tile mode from a web client.

====map file====
  LAYER
    NAME ...
    MINSCALEDENOM 45001
    ....
  END

====client====
function load() {
  if (GBrowserIsCompatible()) {
    var urlTemplate = 'http://server/cgi-bin/mapserv?';
        urlTemplate += 'map=my.map&';
        urlTemplate += 'layers=ALL&';
        urlTemplate += 'mode=tile&';
        urlTemplate += 'tilemode=gmap&';
        urlTemplate += 'tile={X}+{Y}+{Z}';
        .....
  }
}

Surprisingly it seems that Mapserver will automatically take "scale value"
into consideration when zoom in or out the map. The result is pretty good.
How is the CGI request interpreted?

Can I do something like that in "map" mode as well? that is, with mapext and
SCALEDENOM.
I tried
map=mapfile.map&layers=ALL&mode=MAP&mapext=11.25+45+12.5+58.25&SCALEDENOM=45000
and I got nothing.

thanks in advance.


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


More information about the mapserver-users mailing list