[fusion-commits] r2456 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Nov 10 22:12:48 EST 2011
Author: liuar
Date: 2011-11-10 19:12:48 -0800 (Thu, 10 Nov 2011)
New Revision: 2456
Modified:
trunk/lib/Map.js
Log:
A minor fix while deleting elements in array.
Modified: trunk/lib/Map.js
===================================================================
--- trunk/lib/Map.js 2011-11-10 08:38:50 UTC (rev 2455)
+++ trunk/lib/Map.js 2011-11-11 03:12:48 UTC (rev 2456)
@@ -283,7 +283,7 @@
this.mapGroup = mapGroup;
var startIndex = loadOverlays?1:0;
- for (var i=startIndex; i<this.aMaps.length; i++) {
+ for (var i = this.aMaps.length-1; i >= startIndex; i--) {
if (this.aMaps[i].oLayerOL) {
this.aMaps[i].oLayerOL.destroy();
this.aMaps.splice(i,1);
@@ -653,6 +653,7 @@
* {Boolean} zoomTo - if set, will zoom to the selection on completion
*/
setSelection: function(selText, zoomTo) {
+ debugger;
for (var i=0; i<this.aMaps.length; i++ ) {
this.aMaps[i].setSelection(selText, zoomTo);
}
More information about the fusion-commits
mailing list