OpenLayers OpenLayers

Ticket #777: getWarningHTML.patch

File getWarningHTML.patch, 1.1 kB (added by euzuro, 1 year ago)

add some more comments and a default getWarningHTML() function in case 3rd party layers are lazy

  • lib/OpenLayers/Layer/EventPane.js

    old new  
    9090        } 
    9191    }, 
    9292   
    93     /** If we can't load the GMap, then display an error message to the  
    94      *   user and tell them where to go for help. 
     93    /** If we can't load the 3rd party map object, then display an error  
     94     *   message to the user and tell them where to go for help. 
    9595     *  
     96     *  This function sets up the layout for the warning message. Each 3rd 
     97     *   party layer must implement its own getWarningHTML() function to  
     98     *   provide the actual warning message. 
     99     *  
    96100     * @private 
    97101     *  
    98102     */ 
     
    125129        this.div.appendChild(div); 
    126130    }, 
    127131   
     132    /**  
     133     * @return String with information on why layer is broken, how to get 
     134     *          it working. 
     135     * @type String 
     136     */ 
     137    getWarningHTML:function() { 
     138        //should be implemented by subclasses 
     139        return ""; 
     140    }, 
    128141   
    129142    /**  
    130143     * @param {Boolean} display