If scales is set on the map, you cannot use minScale and maxScale on the layer. r=crschmidt. (closes #1199)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5755 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2008-01-15 20:49:24 +00:00
parent c768a12a4d
commit 0f2d373a90

View File

@@ -624,6 +624,20 @@ OpenLayers.Layer = OpenLayers.Class({
confProps[property] = this.options[property] || this.map[property];
}
// Do not use the scales/resolutions at the map level if
// minScale/minResolution and maxScale/maxResolution are
// specified at the layer level
if (this.options.minScale != null &&
this.options.maxScale != null &&
this.options.scales == null) {
confProps.scales = null;
}
if (this.options.minResolution != null &&
this.options.maxResolution != null &&
this.options.resolutions == null) {
confProps.resolutions = null;
}
// If numZoomLevels hasn't been set and the maxZoomLevel *has*,
// then use maxZoomLevel to calculate numZoomLevels
//