From 2f9dbd13961c6ef253b65d6554852973d541d632 Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 27 Aug 2007 16:18:14 +0000 Subject: [PATCH] deprecate use of 'minZoomLevels' in WFS layer. (Closes #672) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4056 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WFS.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/WFS.js b/lib/OpenLayers/Layer/WFS.js index fb5e8d2b02..1ba635f970 100644 --- a/lib/OpenLayers/Layer/WFS.js +++ b/lib/OpenLayers/Layer/WFS.js @@ -163,11 +163,25 @@ OpenLayers.Layer.WFS = OpenLayers.Class( } } + //DEPRECATED - REMOVE IN 3.0 // don't load data if current zoom level doesn't match - if (this.options.minZoomLevel && - (this.map.getZoom() < this.options.minZoomLevel) ) { - return null; - }; + if (this.options.minZoomLevel) { + + var err = "The minZoomLevel property is only intended for use " + + "with the FixedZoomLevels-descendent layers. That this " + + "wfs layer checks for minZoomLevel is a relic of the" + + "past. We cannot, however, remove it without possibly " + + "breaking OL based applications that may depend on it." + + " Therefore we are deprecating it -- the minZoomLevel " + + "check below will be removed at 3.0. Please instead " + + "use min/max resolution setting as described here: " + + "http://trac.openlayers.org/wiki/SettingZoomLevels"; + OpenLayers.Console.warn(err); + + if (this.map.getZoom() < this.options.minZoomLevel) { + return null; + } + } if (bounds == null) { bounds = this.map.getExtent();