OpenLayers OpenLayers

Changeset 7688

Show
Ignore:
Timestamp:
08/04/08 05:20:23 (4 months ago)
Author:
elemoine
Message:

if scales is set on the map, you cannot use minScale and maxScale on the layer, p=pgiraud, r=me,euzuro (closes #1199)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Layer.js

    r7627 r7688  
    688688        } 
    689689 
    690         // Do not use the scales/resolutions at the map level if 
    691         // minScale/minResolution and maxScale/maxResolution ar
    692         // specified at the layer level 
    693         if (this.options.minScale != null && 
    694             this.options.maxScale != null && 
     690        // Do not use the scales array set at the map level if  
     691        // either minScale or maxScale or both are set at th
     692        // layer level 
     693        if ((this.options.minScale != null || 
     694            this.options.maxScale != null) && 
    695695            this.options.scales == null) { 
     696 
    696697            confProps.scales = null; 
    697698        } 
    698         if (this.options.minResolution != null && 
    699             this.options.maxResolution != null && 
     699        // Do not use the resolutions array set at the map level if  
     700        // either minResolution or maxResolution or both are set at the 
     701        // layer level 
     702        if ((this.options.minResolution != null || 
     703             this.options.maxResolution != null) && 
    700704            this.options.resolutions == null) { 
     705 
    701706            confProps.resolutions = null; 
    702707        }