[OpenLayers-Commits] r3629 - trunk/openlayers/lib/OpenLayers/Layer

commits at openlayers.org commits at openlayers.org
Fri Jul 6 16:27:11 EDT 2007


Author: euzuro
Date: 2007-07-06 16:27:08 -0400 (Fri, 06 Jul 2007)
New Revision: 3629

Modified:
   trunk/openlayers/lib/OpenLayers/Layer/EventPane.js
Log:
patch for #777 - adding documentation and stub for getWarningHTML

Modified: trunk/openlayers/lib/OpenLayers/Layer/EventPane.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/EventPane.js	2007-07-06 20:15:42 UTC (rev 3628)
+++ trunk/openlayers/lib/OpenLayers/Layer/EventPane.js	2007-07-06 20:27:08 UTC (rev 3629)
@@ -110,7 +110,11 @@
     /**
      * Method: loadWarningMessage
      * If we can't load the map lib, then display an error message to the 
-     * user and tell them where to go for help.
+     *     user and tell them where to go for help.
+     * 
+     *     This function sets up the layout for the warning message. Each 3rd
+     *     party layer must implement its own getWarningHTML() function to 
+     *     provide the actual warning message.
      */
     loadWarningMessage:function() {
 
@@ -141,6 +145,18 @@
         this.div.appendChild(div);
     },
   
+    /** 
+     * Method: getWarningHTML
+     * To be implemented by subclasses.
+     * 
+     * Return:
+     * {String} String with information on why layer is broken, how to get
+     *          it working.
+     */
+    getWarningHTML:function() {
+        //should be implemented by subclasses
+        return "";
+    },
   
     /**
      * Method: display



More information about the Commits mailing list