[fusion-commits] r2609 - sandbox/adsk/2.3r/layers/Generic

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Sep 20 01:37:33 PDT 2012


Author: liuar
Date: 2012-09-20 01:37:32 -0700 (Thu, 20 Sep 2012)
New Revision: 2609

Modified:
   sandbox/adsk/2.3r/layers/Generic/Generic.js
Log:
Integrate 2608

Modified: sandbox/adsk/2.3r/layers/Generic/Generic.js
===================================================================
--- sandbox/adsk/2.3r/layers/Generic/Generic.js	2012-09-20 08:36:49 UTC (rev 2608)
+++ sandbox/adsk/2.3r/layers/Generic/Generic.js	2012-09-20 08:37:32 UTC (rev 2609)
@@ -78,6 +78,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();
         }
@@ -217,9 +225,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() {
@@ -227,12 +232,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