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();