[fusion-commits] r2610 - sandbox/adsk/2.4j/layers/Generic

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Sep 20 02:04:30 PDT 2012


Author: liuar
Date: 2012-09-20 02:04:29 -0700 (Thu, 20 Sep 2012)
New Revision: 2610

Modified:
   sandbox/adsk/2.4j/layers/Generic/Generic.js
Log:
Integrate 2608

Modified: sandbox/adsk/2.4j/layers/Generic/Generic.js
===================================================================
--- sandbox/adsk/2.4j/layers/Generic/Generic.js	2012-09-20 08:37:32 UTC (rev 2609)
+++ sandbox/adsk/2.4j/layers/Generic/Generic.js	2012-09-20 09:04:29 UTC (rev 2610)
@@ -61,6 +61,14 @@
         this.bMapLoaded = false;
 
         this.triggerEvent(Fusion.Event.LAYER_LOADING);
+        
+        this.internalLoadMap(resourceId);
+        
+        //this.triggerEvent(Fusion.Event.LAYER_LOADED);
+        window.setTimeout(OpenLayers.Function.bind(this.asyncTrigger, this),1);
+    },
+
+    internalLoadMap: function(resourceId) {
         if (this.bIsMapWidgetLayer) {
           this.mapWidget._addWorker();
         }
@@ -248,9 +256,6 @@
           this.mapWidget.addMap(this);
           this.mapWidget._removeWorker();
         }
-        
-        //this.triggerEvent(Fusion.Event.LAYER_LOADED);
-        window.setTimeout(OpenLayers.Function.bind(this.asyncTrigger, this),1);
     },
     
     asyncTrigger: function() {
@@ -269,12 +274,15 @@
         this.triggerEvent(Fusion.Event.LAYER_LOADED);
     },
     
-//TBD: this function not yet converted for OL    
+    //TBD: this function not yet converted for OL    
     reloadMap: function() {
+        this.bMapLoaded = false;
         
-        this.loadMap(this.sResourceId);
-            this.mapWidget.triggerEvent(Fusion.Event.MAP_RELOADED);
-            this.drawMap();
+        this.internalLoadMap(this.sResourceId);
+        this.mapWidget.triggerEvent(Fusion.Event.MAP_RELOADED);
+        this.drawMap();
+        
+        this.bMapLoaded = true;
     },
     
     drawMap: function() {



More information about the fusion-commits mailing list