[fusion-commits] r2094 - trunk/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Mar 10 15:47:26 EST 2010


Author: madair
Date: 2010-03-10 15:47:25 -0500 (Wed, 10 Mar 2010)
New Revision: 2094

Modified:
   trunk/lib/ApplicationDefinition.js
Log:
re #315, #367: make sure that all <Map> objects end up with a valid EPSG code

Modified: trunk/lib/ApplicationDefinition.js
===================================================================
--- trunk/lib/ApplicationDefinition.js	2010-03-09 18:41:24 UTC (rev 2093)
+++ trunk/lib/ApplicationDefinition.js	2010-03-10 20:47:25 UTC (rev 2094)
@@ -526,7 +526,7 @@
         }
         
         //projection info from the extension
-        this.projCode = "EPSG:4326";  //default to WGS84 lat long
+        //this.projCode = "EPSG:4326";  //default to WGS84 lat long
         if (this.extension.ProjectionCode) {
           this.projCode = this.extension.ProjectionCode[0];
         }
@@ -537,6 +537,9 @@
           }
           Proj4js.defs[this.projCode] = projDef;
         }
+        if (!this.projCode) {
+          this.projCode = "EPSG:4326";
+        }
 
         switch (this.type) {
           case 'MapGuide':
@@ -545,6 +548,12 @@
                   Fusion.require('layers/' + this.type + '/' + this.type + '.js');
             }
             break;
+          case "Google":
+          case "Yahoo":
+          case "VirtualEarth":
+              this.layerOptions.sphericalMercator = true;
+              this.layerOptions.displayProjection = "EPSG:4326";
+              //no break here continue below to set EPSG:3785 as projCode
           default:
             if (this.layerOptions.sphericalMercator) {
               this.projCode = "EPSG:3785";  //commercial map layer projection spherical mercator



More information about the fusion-commits mailing list