OpenLayers OpenLayers

Ticket #1457: 1457.2.patch

File 1457.2.patch, 1.9 kB (added by crschmidt, 10 months ago)
  • tests/Layer/test_Google.html

    old new  
    215215                          window.location.host); 
    216216        } 
    217217    }     
     218    function test_02_Layer_Google_isBaseLayer (t) { 
     219        if(validkey) { 
     220            t.plan(3); 
     221            var map = new OpenLayers.Map( 'map' ,  
     222            { controls: [] , 'numZoomLevels':20}); 
     223     
     224            var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} ); 
     225            map.addLayers([satellite]); 
     226            map.zoomToMaxExtent(); 
     227             
     228            t.eq(satellite.div.style.display, "", "Satellite layer is visible."); 
     229            satellite.setVisibility(false); 
     230            t.eq(satellite.div.style.display, "none", "Satellite layer is not visible."); 
     231            satellite.setVisibility(true); 
     232            t.eq(satellite.div.style.display, "block", "Satellite layer is visible."); 
     233             
     234        } else { 
     235            t.plan(0); 
     236            t.debug_print("Google tests can't be run from " + 
     237                          window.location.host); 
     238        } 
     239    }     
    218240 
    219241  </script> 
    220242</head> 
  • lib/OpenLayers/Layer/FixedZoomLevels.js

    old new  
    110110            for(var i= this.minZoomLevel; i <= this.maxZoomLevel; i++) { 
    111111                this.resolutions[resolutionsIndex++] = this.RESOLUTIONS[i];             
    112112            } 
    113         }         
     113            this.maxResolution = this.resolutions[0]; 
     114            this.minResolution = this.resolutions[this.resolutions.length - 1]; 
     115        }        
    114116    }, 
    115117     
    116118    /**