[fusion-commits] r2349 - in trunk: layers/MapGuide lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Mar 29 14:28:36 EDT 2011


Author: madair
Date: 2011-03-29 11:28:35 -0700 (Tue, 29 Mar 2011)
New Revision: 2349

Modified:
   trunk/layers/MapGuide/MapGuide.js
   trunk/lib/fusion.js
Log:
re #434: use WKT returned by MapGuide over the EPSG code returned

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2011-03-29 14:00:46 UTC (rev 2348)
+++ trunk/layers/MapGuide/MapGuide.js	2011-03-29 18:28:35 UTC (rev 2349)
@@ -310,13 +310,13 @@
 
             //set projection units and code if supplied
             var wktProj;
-            if (o.epsg != 0) {
+            if (o.wkt && o.wkt.length > 0){
+              wktProj = new OpenLayers.Projection(o.wkt);
+            } else if (o.epsg != 0) {
               this.mapTag.layerOptions.projection = "EPSG:" + o.epsg;
             } else {
               //default to the local non-projected system if not otherwise specified
-              if (!o.wkt || o.wkt.length == 0){
-                o.wkt = "LOCAL_CS[\"Non-Earth (Meter)\",LOCAL_DATUM[\"Local Datum\",0],UNIT[\"Meter\", 1],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]";
-              }
+              o.wkt = "LOCAL_CS[\"Non-Earth (Meter)\",LOCAL_DATUM[\"Local Datum\",0],UNIT[\"Meter\", 1],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]";
               wktProj = new OpenLayers.Projection(o.wkt);
             }
             //TODO: consider passing the metersPerUnit value into the framework

Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js	2011-03-29 14:00:46 UTC (rev 2348)
+++ trunk/lib/fusion.js	2011-03-29 18:28:35 UTC (rev 2349)
@@ -1227,6 +1227,7 @@
                 var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
                 OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
                 OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;
+                OpenLayers.INCHES_PER_UNIT["Degree"] = inPerUnit;
             }
         },
     



More information about the fusion-commits mailing list