[fusion-commits] r2559 - sandbox/adsk/2.4j/layers/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Jul 30 01:32:18 PDT 2012


Author: liuar
Date: 2012-07-30 01:32:17 -0700 (Mon, 30 Jul 2012)
New Revision: 2559

Modified:
   sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php
Log:
On behalf of Andy Zhang:We should add geometry name to query property list, otherwise the selection operation maybe fail. This change makes fusion code be consistent with ASP code.

Modified: sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php
===================================================================
--- sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php	2012-07-30 06:57:03 UTC (rev 2558)
+++ sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php	2012-07-30 08:32:17 UTC (rev 2559)
@@ -80,16 +80,18 @@
             //could it be that $selection->AddFeatures($layerObj, $featureReader, 0) is
             //the one causing a problem when the properies are limited ?
             if (isset($_SESSION['property_mappings']) && isset($_SESSION['property_mappings'][$oLayer->GetObjectId()])) {
-                $mappings = $_SESSION['property_mappings'][$oLayer->GetObjectId()];
-                if (0 && count($mappings) > 0) {
+                $mappings = $_SESSION['property_mappings'][$oLayer->GetObjectId()];                
+				if (count($mappings) > 0) {
                     foreach($mappings as $name => $value) {
                         $queryOptions->AddFeatureProperty($name);
                         //echo "$name $value <br>\n";
                     }
-                    $geomName = $oLayer->GetFeatureGeometryName();
-                    $queryOptions->AddFeatureProperty($geomName);
                 }
             }
+			
+			//Add geometry property in all cases.
+			$geomName = $oLayer->GetFeatureGeometryName();
+			$queryOptions->AddFeatureProperty($geomName);
 
             $filter = $selection->GenerateFilter($oLayer, $class);
             $queryOptions->SetFilter($filter);
@@ -136,7 +138,7 @@
 
             $properties = BuildSelectionArray($featureReader, $layerName, $properties,
                                               $bComputedProperties,
-                                              $srsLayer, $bNeedsTransform, $oLayer, true);
+                                              $srsLayer, $bNeedsTransform, $oLayer);
             $featureReader->Close();
         }
 



More information about the fusion-commits mailing list