Changeset 3589 for contribs

Show
Ignore:
Timestamp:
07/09/10 11:36:42 (23 months ago)
Author:
cmoullet
Message:

Fix blank tiles

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • contribs/mapfish-api/trunk/MapFishApi/js/mapfish_api.js

    r3588 r3589  
    179179        this.debug = Boolean(this.baseConfig.debug); 
    180180        this.isMainApp = Boolean(this.baseConfig.isMainApp); 
    181         if (typeof this.baseConfig.activatePopup !='undefined') { 
     181        if (typeof this.baseConfig.activatePopup != 'undefined') { 
    182182            this.activatePopup = this.baseConfig.activatePopup; 
    183         }; 
     183        } 
    184184        this.layerTreeNodes = []; 
    185185 
     
    189189        if (lang) { 
    190190            OpenLayers.Lang.setCode(lang); 
     191        } 
     192 
     193        if (!this.debug) { 
     194            // keep missing tiles transparent: 
     195            OpenLayers.Util.onImageLoadError = function() { 
     196                this.style.display = "none"; 
     197                // set the img src because webkit don't take the display into 
     198                // account and display a "broken image" icon. 
     199                this.src = Ext.BLANK_IMAGE_URL; 
     200            }; 
    191201        } 
    192202    }, 
     
    454464            }); 
    455465        } 
    456          
     466 
    457467        this.tree = new mapfish.widgets.LayerTree(options); 
    458          
     468 
    459469        if (config.layers) { 
    460470            var checkedNodes = this.tree.getChecked(); 
     
    468478            } 
    469479        } 
    470          
     480 
    471481        return this.tree; 
    472482    }, 
     
    11301140                                feature: e.feature 
    11311141                            }); 
    1132                         }; 
     1142                        } 
     1143                        ; 
    11331144                        document.body.style.cursor = 'default'; 
    11341145                    },