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

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Nov 21 12:06:47 EST 2011


Author: madair
Date: 2011-11-21 09:06:46 -0800 (Mon, 21 Nov 2011)
New Revision: 2464

Modified:
   trunk/layers/MapGuide/MapGuide.js
   trunk/lib/OLpatch.js
Log:
closes #485: set displayOutsideMaxExtent to true by default and obey that setting in the Map isValidLatLon method.

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2011-11-21 09:29:04 UTC (rev 2463)
+++ trunk/layers/MapGuide/MapGuide.js	2011-11-21 17:06:46 UTC (rev 2464)
@@ -647,6 +647,7 @@
         layerOptions.maxScale = this.minScale;
       }
 
+      layerOptions.displayOutsideMaxExtent = true;
       layerOptions.singleTile = bSingleTile;
       OpenLayers.Util.extend(layerOptions, this.mapTag.layerOptions);
 

Modified: trunk/lib/OLpatch.js
===================================================================
--- trunk/lib/OLpatch.js	2011-11-21 09:29:04 UTC (rev 2463)
+++ trunk/lib/OLpatch.js	2011-11-21 17:06:46 UTC (rev 2464)
@@ -1,2 +1,22 @@
 /** remove String.prototype.contains **/
-String.prototype.contains = null;
\ No newline at end of file
+String.prototype.contains = null;
+
+/**
+ * Method: isValidLonLat
+ * 
+ * Parameters:
+ * lonlat - {<OpenLayers.LonLat>}
+ * 
+ * Returns:
+ * {Boolean} Whether or not the lonlat passed in is non-null and within
+ *           the maxExtent bounds
+ */
+OpenLayers.Map.prototype.isValidLonLat = function(lonlat) {
+    var valid = false;
+    if (lonlat != null) {
+        var maxExtent = this.getMaxExtent();
+        valid = this.baseLayer.displayOutsideMaxExtent || maxExtent.containsLonLat(lonlat);        
+    }
+    return valid;
+}
+



More information about the fusion-commits mailing list