I assume the 'M' stands for million. If you want the layer to be only visible when 'zoomed in' beyond 1:2M, I would set a MAXSCALEDENOM of 2000000.
If you want the layer to be only visible when 'zoomed out' beyond 1:2M, I would set a MINSCALEDENOM of 2000000. If you only want the layer to be visible between resolutions of 1:100000 and 1:200000, you would set: both MINSCALEDENOM 100000 and MAXSCALEDENOM 200000 These values go in either a LAYER or CLASS of LAYER in your MapServer map file. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of sunny74 Sent: Friday, August 28, 2009 8:45 AM To: [email protected] Subject: Re: [mapserver-users] turning on layers at a particular zoom level Hi, Thanks for your reply. I went thru the link and read about MAXSCALEDENOM/MINSCALEDENOM. So MINSCALEDENOM is the minimum scale level at which a layer will become visible. But I am a bit confused.When the map loads for the first time it has a zoom level of 7 as given in the code below. map.setCenter(new OpenLayers.LonLat(74.25, 20.35), 7); In terms of scale it is showing 1:3M. What is M? If I increase the zoom level i.e do zoom in, scale becomes 1:856K and 1:256K etc i.e scale decreases. So If want a layer to be visible at a scale level of 1:2M what do I write in the mapfile? How to use TileCache or GeoWebCache?Pls give the js code. Rahkonen Jukka wrote: > > Hi, > > Mapserver is somehow documented, about adjusting visibility according > to scale, try to find MAXSCALEDENOM/MINSCALEDENOM from > http://www.mapserver.org/mapfile/layer.html#index-21 > > Mapserver does not do caching but you can use for examply TileCache or > GeoWebCache between your clients and Mapserver. > > -Jukka Rahkonen- > > > >> -----Alkuperäinen viesti----- >> Lähettäjä: [email protected] >> [mailto:[email protected]] Puolesta sunny74 >> Lähetetty: 28. elokuuta 2009 14:53 >> Vastaanottaja: [email protected] >> Aihe: [mapserver-users] turning on layers at a particular zoom level >> >> >> DEar Friends, >> >> I have 12 layers in my map and it is taking tooooo long to >> load.Therefore I decided to turn on only 2 layers at Page Load. >> >> Rest of the layers I want to turn on at a particular zoom >> level.How can I check the zoom level and turn on these layers. >> >> How can make the map load faster especially on page reload? Is it >> possible to cache the map or is there some other technique? >> >> Thanks for ur reply. >> >> -- >> View this message in context: >> http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-le >> vel-tp3534156p3534156.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> _______________________________________________ >> mapserver-users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://n2.nabble.com/turning-on-layers-at-a-particular-zoom-level-tp3534156p3534743.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
