On Wed, Nov 3, 2010 at 1:20 PM, Charles Galpin <[email protected]> wrote: > I know this has been discussed before and I have read the SettingZoomLevels > wiki page several times but I still cant figure out how to control the > display of my vector layer by zoom level. I must be missing something pretty > basic. > > In short, all I want to do is wait until a certain zoom level before enabling > the layer so it doesn't query the server before then and get too many > features. For example using google maps as the base layer, map.getZoom() > returns 14 and map.getResolution() returns 9.554 around about where I'd like > it to start displaying but any combination of minScale, maxScale, > minResolution, maxResolution, minZoomLevel, maxZoomLevel I try on my layer > does not seem to have any effect. I've tried 1/the number, and overly large > and small values to try see what affects it, but none do anything. > > I know I can control this with SLD in geoserver, but I'd like to control this > from openlayers. Does anyone have a simple example that shows this working?
Hi. Setting minResolution and/or maxResolution in the vector layer options should work. For further help could you please provide an example where it doesn't? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
