[fusion-commits] r2608 - trunk/layers/Generic
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Sep 20 01:36:49 PDT 2012
Author: liuar
Date: 2012-09-20 01:36:49 -0700 (Thu, 20 Sep 2012)
New Revision: 2608
Modified:
trunk/layers/Generic/Generic.js
Log:
Submit on behalf of Spark Liu: Fix ticket #544
Add a new function internalReloadMap to avoid trigger MAP_LOADED during reloading
Modified: trunk/layers/Generic/Generic.js
===================================================================
--- trunk/layers/Generic/Generic.js 2012-09-20 05:13:44 UTC (rev 2607)
+++ trunk/layers/Generic/Generic.js 2012-09-20 08:36:49 UTC (rev 2608)
@@ -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();
}
@@ -251,9 +259,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() {
@@ -272,12 +277,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