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

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Nov 16 22:05:48 EST 2009


Author: liuar
Date: 2009-11-16 22:05:46 -0500 (Mon, 16 Nov 2009)
New Revision: 1977

Modified:
   trunk/layers/Generic/Generic.js
Log:
Fixed ticket 317 at http://trac.osgeo.org/fusion/ticket/317
Map doesn't display as the selected base layers after selecting Map widget.

Modified: trunk/layers/Generic/Generic.js
===================================================================
--- trunk/layers/Generic/Generic.js	2009-11-16 20:09:34 UTC (rev 1976)
+++ trunk/layers/Generic/Generic.js	2009-11-17 03:05:46 UTC (rev 1977)
@@ -103,20 +103,32 @@
                 this.mapTag.layerOptions.type = G_SATELLITE_MAP;
                 break;
               case 'G_NORMAL_MAP':
+				this.mapTag.layerOptions.type = G_NORMAL_MAP;
               default:
-                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':
                  this.mapTag.layerOptions.type = VEMapStyle.Aerial;
                  break;
                case 'Shaded':
+			   case 's':
                  this.mapTag.layerOptions.type = VEMapStyle.Shaded;
                  break;
                case 'Hybrid':
+			   case 'h':
                  this.mapTag.layerOptions.type = VEMapStyle.Hybrid;
                  break;
                default:
@@ -127,12 +139,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':
                 this.mapTag.layerOptions.type = YAHOO_MAP_SAT;
                 break;
               case 'YAHOO_MAP_HYB':
+			  case 'YAHOO_HYB':
                 this.mapTag.layerOptions.type = YAHOO_MAP_HYB;
                 break;
               case 'YAHOO_MAP_REG':
+			  case "YAHOO_REG":
               default:
                 this.mapTag.layerOptions.type = YAHOO_MAP_REG;
                 break;



More information about the fusion-commits mailing list