[fusion-commits] r2195 - trunk/layers/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Jul 29 05:23:22 EDT 2010


Author: liuar
Date: 2010-07-29 09:23:22 +0000 (Thu, 29 Jul 2010)
New Revision: 2195

Modified:
   trunk/layers/MapGuide/MapGuide.js
Log:
Submit on behalf of Spark Liu

Ticket #401 The meaning of null CS for a MapGuide map is not compatible with that of null CS of Map Widget

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2010-07-28 15:31:25 UTC (rev 2194)
+++ trunk/layers/MapGuide/MapGuide.js	2010-07-29 09:23:22 UTC (rev 2195)
@@ -304,15 +304,16 @@
             if (o.epsg != 0) {
               this.mapTag.layerOptions.projection = "EPSG:" + o.epsg;
             } else {
-              if (o.wkt.length > 0) {
-                  var wkt = o.wkt;
-                  var wktContentRE = /(\w+)\[(.*)\]/;
-                  var wktContent = wkt.match(wktContentRE);
-                  var wktName = wktContent[2].split(",")[0];
-                  wktName = wktName.toUpperCase();
-                  this.mapTag.layerOptions.projection = wktName;
-                  Proj4js.defs[wktName] = "+proj=identity +"+wkt;
-              }  
+              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]]";
+              }
+              var wkt = o.wkt;
+              var wktContentRE = /(\w+)\[(.*)\]/;
+              var wktContent = wkt.match(wktContentRE);
+              var wktName = wktContent[2].split(",")[0];
+              wktName = wktName.toUpperCase();
+              this.mapTag.layerOptions.projection = wktName;
+              Proj4js.defs[wktName] = "+proj=identity +"+wkt;
             }
             //TODO: consider passing the metersPerUnit value into the framework
             //to allow for scaling that doesn't match any of the pre-canned units



More information about the fusion-commits mailing list