[fusion-commits] r1690 - trunk/layers/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Nov 26 16:46:27 EST 2008


Author: chrisclaydon
Date: 2008-11-26 16:46:27 -0500 (Wed, 26 Nov 2008)
New Revision: 1690

Modified:
   trunk/layers/MapGuide/php/Query.php
Log:
ref #159 - Don't calculate computed properties for extensions to the selection unless specifically requested.

Modified: trunk/layers/MapGuide/php/Query.php
===================================================================
--- trunk/layers/MapGuide/php/Query.php	2008-11-26 21:21:10 UTC (rev 1689)
+++ trunk/layers/MapGuide/php/Query.php	2008-11-26 21:46:27 UTC (rev 1690)
@@ -46,7 +46,7 @@
     if (isset($_REQUEST['maxfeatures'])) {
       $maxFeatures = $_REQUEST['maxfeatures'];
     }
-    
+
     // echo "<!--";
     //     print_r($_REQUEST);
     //     echo "-->";
@@ -76,7 +76,7 @@
 
     /* add the features to the map selection and save it*/
     $selection = new MgSelection($map);
-    
+
     /* if extending the current selection */
     $bExtendSelection = isset($_REQUEST['extendselection']) && strcasecmp($_REQUEST['extendselection'], 'true') == 0;
     if ($bExtendSelection) {
@@ -84,10 +84,10 @@
         $selection->Open($resourceService, $mapName);
         $aLayers = selectionToArray($selection, array());
     }
-    
+
     $bComputedProperties = isset($_REQUEST['computed']) && strcasecmp($_REQUEST['computed'], 'true') == 0;
     $bQueryHiddenLayers = isset($_REQUEST['queryHiddenLayers']) && strcasecmp($_REQUEST['queryHiddenLayers'], 'true') == 0;
-    
+
     /*holds selection array*/
     $properties = NULL;
     $properties->layers = array();
@@ -114,7 +114,7 @@
                 $layerObj = $mapLayers->GetItem($i);
             }
             $bVisFlag = $layerObj->IsVisible() || $bQueryHiddenLayers;
-            
+
             $className = $layerObj->GetFeatureClassName();
             if (!$layerObj->GetSelectable() || !$bVisFlag ||
                 $className=='RedlineSchema:Redline' ||
@@ -135,7 +135,7 @@
 
             //only retrieve properties that we actually need
             $mappings = $_SESSION['property_mappings'][$layerObj->GetObjectId()];
-            
+
             //TODO : seems that property mapping breaks the selection ????
             //could it be that $selection->AddFeatures($layerObj, $featureReader, 0) is
             //the one causing a problem when the properies are limited ?
@@ -202,7 +202,7 @@
                 echo $e->GetDetails() . "\n";
                 echo $e->GetStackTrace() . "\n";
             }
-            
+
             //debug block
             //$testSelection = new MgSelection($map);
             //$testSelection->AddFeatures($layerObj, $featureReader, $maxFeatures);
@@ -328,7 +328,6 @@
                 //
                 $bLayerSrsIsArbitrary = ($srsLayer->GetType() == MgCoordinateSystemType::Arbitrary);
                 $bMapSrsIsArbitrary = ($srsMap->GetType() == MgCoordinateSystemType::Arbitrary);
-                $bComputedProperties = true;
                 $bNeedsTransform = false;
                 if (($bLayerSrsIsArbitrary != $bMapSrsIsArbitrary) ||
                     ($bLayerSrsIsArbitrary && ($srsLayer->GetUnits() != $srsMap->GetUnits()))) {



More information about the fusion-commits mailing list