[fusion-commits] r1983 - trunk/layers/Generic

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Nov 18 11:08:27 EST 2009


Author: chrisclaydon
Date: 2009-11-18 11:08:27 -0500 (Wed, 18 Nov 2009)
New Revision: 1983

Modified:
   trunk/layers/Generic/Generic.js
Log:
Fixes #330 "Theme doesn't work on the map with commercial layers" Submitted on behalf or Arthur Liu. 

Modified: trunk/layers/Generic/Generic.js
===================================================================
--- trunk/layers/Generic/Generic.js	2009-11-17 16:48:54 UTC (rev 1982)
+++ trunk/layers/Generic/Generic.js	2009-11-18 16:08:27 UTC (rev 1983)
@@ -88,6 +88,7 @@
             this.oLayerOL.events.unregister("loadend", this, this.loadEnd);
             this.oLayerOL.events.unregister("loadcancel", this, this.loadEnd);
             this.oLayerOL.destroy();
+            this.oLayerOL = null;
         }
 
         switch (this.layerType) {
@@ -103,32 +104,32 @@
                 this.mapTag.layerOptions.type = G_SATELLITE_MAP;
                 break;
               case 'G_NORMAL_MAP':
-				this.mapTag.layerOptions.type = G_NORMAL_MAP;
+                this.mapTag.layerOptions.type = G_NORMAL_MAP;
               default:
-				// For the re-loaded Google layers
-				if(this.mapTag.layerOptions.type == G_PHYSICAL_MAP)
-					this.mapTag.layerOptions.type = G_PHYSICAL_MAP;
-				else if(this.mapTag.layerOptions.type == G_HYBRID_MAP)
-					this.mapTag.layerOptions.type = G_HYBRID_MAP;
-				else if(this.mapTag.layerOptions.type == G_SATELLITE_MAP)
-				    this.mapTag.layerOptions.type = G_SATELLITE_MAP;
-				else 
-					this.mapTag.layerOptions.type = G_NORMAL_MAP;
+                // For the re-loaded Google layers
+                if(this.mapTag.layerOptions.type == G_PHYSICAL_MAP)
+                  this.mapTag.layerOptions.type = G_PHYSICAL_MAP;
+                else if(this.mapTag.layerOptions.type == G_HYBRID_MAP)
+                  this.mapTag.layerOptions.type = G_HYBRID_MAP;
+                else if(this.mapTag.layerOptions.type == G_SATELLITE_MAP)
+                  this.mapTag.layerOptions.type = G_SATELLITE_MAP;
+                else 
+                  this.mapTag.layerOptions.type = G_NORMAL_MAP;
                 break;
             }
             break;
          case 'VirtualEarth':         
              switch (this.mapTag.layerOptions.type) {   //VE layer types are enumerated values
                case 'Aerial':              //defined in VEMapStyle from the VE api
-			   case 'a':
+               case 'a':
                  this.mapTag.layerOptions.type = VEMapStyle.Aerial;
                  break;
                case 'Shaded':
-			   case 's':
+               case 's':
                  this.mapTag.layerOptions.type = VEMapStyle.Shaded;
                  break;
                case 'Hybrid':
-			   case 'h':
+               case 'h':
                  this.mapTag.layerOptions.type = VEMapStyle.Hybrid;
                  break;
                default:
@@ -139,15 +140,15 @@
          case 'Yahoo':
             switch (this.mapTag.layerOptions.type) {   //Yahoo is similar to google
               case 'YAHOO_MAP_SAT':              //defined by YMap, not a string
-			  case 'YAHOO_SAT':
+              case 'YAHOO_SAT':
                 this.mapTag.layerOptions.type = YAHOO_MAP_SAT;
                 break;
               case 'YAHOO_MAP_HYB':
-			  case 'YAHOO_HYB':
+              case 'YAHOO_HYB':
                 this.mapTag.layerOptions.type = YAHOO_MAP_HYB;
                 break;
               case 'YAHOO_MAP_REG':
-			  case "YAHOO_REG":
+              case "YAHOO_REG":
               default:
                 this.mapTag.layerOptions.type = YAHOO_MAP_REG;
                 break;



More information about the fusion-commits mailing list