if scales is set on the map, you cannot use minScale and maxScale on the layer, p=pgiraud, r=me,euzuro (closes #1199)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7688 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+12
-7
@@ -687,17 +687,22 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
confProps[property] = this.options[property] || this.map[property];
|
confProps[property] = this.options[property] || this.map[property];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not use the scales/resolutions at the map level if
|
// Do not use the scales array set at the map level if
|
||||||
// minScale/minResolution and maxScale/maxResolution are
|
// either minScale or maxScale or both are set at the
|
||||||
// specified at the layer level
|
// layer level
|
||||||
if (this.options.minScale != null &&
|
if ((this.options.minScale != null ||
|
||||||
this.options.maxScale != null &&
|
this.options.maxScale != null) &&
|
||||||
this.options.scales == null) {
|
this.options.scales == null) {
|
||||||
|
|
||||||
confProps.scales = null;
|
confProps.scales = null;
|
||||||
}
|
}
|
||||||
if (this.options.minResolution != null &&
|
// Do not use the resolutions array set at the map level if
|
||||||
this.options.maxResolution != null &&
|
// either minResolution or maxResolution or both are set at the
|
||||||
|
// layer level
|
||||||
|
if ((this.options.minResolution != null ||
|
||||||
|
this.options.maxResolution != null) &&
|
||||||
this.options.resolutions == null) {
|
this.options.resolutions == null) {
|
||||||
|
|
||||||
confProps.resolutions = null;
|
confProps.resolutions = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user