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

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Nov 19 17:10:33 EST 2008


Author: chrisclaydon
Date: 2008-11-19 17:10:33 -0500 (Wed, 19 Nov 2008)
New Revision: 1678

Modified:
   trunk/layers/MapGuide/MapGuide.js
Log:
REF #177 - Modify the "behaviour" setting for MG selection overlays from 1 to 5. This adds the KeepSelection bitmask value, allowing the selection to remain visible even when outside the scale range of the source layer. This is useful to allow users to determine where their selection is relative to other features without it disappearing when they zoom out.

Also, update the site version check to determine if the MG Server supports selection overlays so that it will not fail for major versions greater than 2 with a minor version of 0. e.g. 3.0.0.0

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2008-11-19 21:03:25 UTC (rev 1677)
+++ trunk/layers/MapGuide/MapGuide.js	2008-11-19 22:10:33 UTC (rev 1678)
@@ -201,8 +201,8 @@
                                           parseInt(bits[2]),
                                           parseInt(bits[3])
             );
-            
 
+
             this.mapTag.layerOptions.maxExtent = OpenLayers.Bounds.fromArray(o.extent);
 
             this.layerRoot.clear();
@@ -493,7 +493,7 @@
 
         this.oLayerOL.mergeNewParams(params);
     },
-    
+
     drawSelection: function() {
         if (this.queryLayer) {
             this.queryLayer.redraw(true);
@@ -509,7 +509,7 @@
      */
     createOLLayer: function(layerName, bIsBaseLayer, bSingleTile, behaviour) {
       /* prevent the useOverlay flag based on site version       */
-      if ( this.siteVersion[0] > 1 && this.siteVersion[1]<1 ) { //v2.0.x or higher
+      if (( this.siteVersion[0] == 2 && this.siteVersion[1] < 1 ) || this.siteVersion[0] < 2) { //v2.0.0 or previous
         this.selectionAsOverlay = false;
       }
       var layerOptions = {
@@ -519,7 +519,7 @@
         useOverlay: this.selectionAsOverlay,
         ratio: this.ratio
       };
-      if (behaviour != 1 && !/WebKit/.test(navigator.userAgent)) {
+      if ((behaviour & 1) == 0 && !/WebKit/.test(navigator.userAgent)) {
         layerOptions.transitionEffect = 'resize';
       }
 
@@ -779,7 +779,7 @@
             if (oNode.hasSelection) {
               if (this.selectionAsOverlay) {
                 if (!this.queryLayer) {
-                  this.queryLayer = this.createOLLayer("query layer", false, true, 1);
+                  this.queryLayer = this.createOLLayer("query layer", false, true, 5);
                   this.mapWidget.oMapOL.addLayer(this.queryLayer);
                   this.mapWidget.registerForEvent(Fusion.Event.MAP_LOADING,
                         OpenLayers.Function.bind(this.removeQueryLayer, this));



More information about the fusion-commits mailing list