OpenLayers OpenLayers

Ticket #677: ymapsize.patch

File ymapsize.patch, 0.9 kB (added by crschmidt, 1 year ago)
  • lib/OpenLayers/Layer/Yahoo.js

    old new  
    6161     */ 
    6262    loadMapObject:function() { 
    6363        try { //do not crash!  
    64             this.mapObject = new YMap(this.div, this.type); 
     64            var size = this.map.getSize(); 
     65            size = new YSize(size.w, size.h); 
     66            this.mapObject = new YMap(this.div, this.type, size); 
    6567            this.mapObject.disableKeyControls(); 
    6668        } catch(e) {} 
    6769    }, 
     70 
     71    /** 
     72     * Method: onMapResize 
     73     *  
     74     */ 
     75    onMapResize: function() { 
     76        try { 
     77            var size = this.map.getSize(); 
     78            size = new YSize(size.w, size.h); 
     79            this.mapObject.resizeTo(size); 
     80        } catch(e) {}      
     81    },     
    6882     
    6983     
    7084    /**