[fusion-commits] r2156 - in sandbox/jxlib-3.0: lib widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue May 4 15:35:24 EDT 2010


Author: madair
Date: 2010-05-04 15:35:23 -0400 (Tue, 04 May 2010)
New Revision: 2156

Modified:
   sandbox/jxlib-3.0/lib/Map.js
   sandbox/jxlib-3.0/widgets/MapMenu.js
Log:
keep track of initial extents projection for switching between maps of different projections

Modified: sandbox/jxlib-3.0/lib/Map.js
===================================================================
--- sandbox/jxlib-3.0/lib/Map.js	2010-04-30 22:28:43 UTC (rev 2155)
+++ sandbox/jxlib-3.0/lib/Map.js	2010-05-04 19:35:23 UTC (rev 2156)
@@ -946,6 +946,10 @@
             Fusion.reportError("AppDef initial view is outside map maxExtent, resetting initialView to maxExtent");
             initialExtents = this.maxExtent;
           }
+          var mapProj = this.oMapOL.baseLayer.projection;
+          if (iv.projection && !iv.projection.equals(mapProj)) {
+            initialExtents.transform(iv.projection, mapProj);
+          }
       } else {
         initialExtents = this.getMapGroupExtent();
         if (!initialExtents) {

Modified: sandbox/jxlib-3.0/widgets/MapMenu.js
===================================================================
--- sandbox/jxlib-3.0/widgets/MapMenu.js	2010-04-30 22:28:43 UTC (rev 2155)
+++ sandbox/jxlib-3.0/widgets/MapMenu.js	2010-05-04 19:35:23 UTC (rev 2156)
@@ -237,7 +237,8 @@
         data.initialView = {minX:ce.left,
                             minY:ce.bottom,
                             maxX:ce.right,
-                            maxY:ce.top
+                            maxY:ce.top,
+                            projection: dest
                             };        
         this.getMap().loadMapGroup(data);
     }



More information about the fusion-commits mailing list