[fusion-commits] r1404 - in trunk: MapGuide lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon May 12 15:45:12 EDT 2008


Author: madair
Date: 2008-05-12 15:45:10 -0400 (Mon, 12 May 2008)
New Revision: 1404

Modified:
   trunk/MapGuide/MapGuide.js
   trunk/lib/Map.js
Log:
re #63: implement fixed set of scales for MapWidget

Modified: trunk/MapGuide/MapGuide.js
===================================================================
--- trunk/MapGuide/MapGuide.js	2008-05-12 13:33:40 UTC (rev 1403)
+++ trunk/MapGuide/MapGuide.js	2008-05-12 19:45:10 UTC (rev 1404)
@@ -500,9 +500,6 @@
         params.showGroups = this.aShowGroups.length > 0 ? this.aShowGroups.toString() : null;
         params.hideGroups = this.aHideGroups.length > 0 ? this.aHideGroups.toString() : null;
         params.refreshLayers = this.aRefreshLayers.length > 0 ? this.aRefreshLayers.toString() : null;
-        if (bIsBaseLayer) {
-          this.mapWidget.oMapOL.setOptions({'fractionalZoom':true});
-        }
 
       } else {
         params = {      //tiled version
@@ -967,9 +964,9 @@
         if (xhr.status == 200) {
             var o;
             eval('o='+xhr.responseText);
-            var h = o['FeatureInformation']['Hyperlink'][0];
-            if (h != '') {
-                window.open(h, "");
+            var h = o['FeatureInformation']['Hyperlink'];
+            if (h) {
+                window.open(h[0], "");
             }
         }
     },

Modified: trunk/lib/Map.js
===================================================================
--- trunk/lib/Map.js	2008-05-12 13:33:40 UTC (rev 1403)
+++ trunk/lib/Map.js	2008-05-12 19:45:10 UTC (rev 1404)
@@ -90,11 +90,18 @@
           this.fractionalZoom = widgetTag.extension.FractionalZoom[0]=='false'?false:true;
         }
         
+        var scalesArray = null;
+        if (widgetTag.extension.Scales) {
+          scalesArray = widgetTag.extension.Scales[0].split(',');
+          this.fractionalZoom = false;
+        }
+        
         OpenLayers.DOTS_PER_INCH = this._nDpi;
         if (!this.oMapOL) {
             var options = {
                 controls: [], 
                 fallThrough: true,
+                scales: scalesArray,
                 fractionalZoom: this.fractionalZoom
             };
             if (widgetTag.extension.ConstrainMapExtent) {



More information about the fusion-commits mailing list