[fusion-commits] r2524 - in sandbox/adsk/2.4j: layers/MapGuide/php widgets/FeatureInfo widgets/SelectWithin

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri Jan 20 00:21:52 EST 2012


Author: liuar
Date: 2012-01-19 21:21:52 -0800 (Thu, 19 Jan 2012)
New Revision: 2524

Modified:
   sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php
   sandbox/adsk/2.4j/layers/MapGuide/php/Query.php
   sandbox/adsk/2.4j/layers/MapGuide/php/Selection.php
   sandbox/adsk/2.4j/layers/MapGuide/php/Utilities.php
   sandbox/adsk/2.4j/widgets/FeatureInfo/featureinfocontroller.php
   sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php
Log:
Integrate changeset 2523

Modified: sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php
===================================================================
--- sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php	2012-01-20 05:16:28 UTC (rev 2523)
+++ sandbox/adsk/2.4j/layers/MapGuide/php/GetSelectionProperties.php	2012-01-20 05:21:52 UTC (rev 2524)
@@ -136,7 +136,7 @@
 
             $properties = BuildSelectionArray($featureReader, $layerName, $properties,
                                               $bComputedProperties,
-                                              $srsLayer, $bNeedsTransform, $oLayer);
+                                              $srsLayer, $bNeedsTransform, $oLayer, true);
             $featureReader->Close();
         }
 

Modified: sandbox/adsk/2.4j/layers/MapGuide/php/Query.php
===================================================================
--- sandbox/adsk/2.4j/layers/MapGuide/php/Query.php	2012-01-20 05:16:28 UTC (rev 2523)
+++ sandbox/adsk/2.4j/layers/MapGuide/php/Query.php	2012-01-20 05:21:52 UTC (rev 2524)
@@ -261,7 +261,7 @@
                 $featureReader = $featureService->SelectFeatures($featureResId, $class, $queryOptions);
                 $properties = BuildSelectionArray($featureReader, $layerName, $properties,
                                                   $bComputedProperties,
-                                                  $srsLayer, $bNeedsTransform, $layerObj);
+                                                  $srsLayer, $bNeedsTransform, $layerObj, true);
                 $featureReader->Close();
             }
         } catch (MgObjectNotFoundException $onfe) {
@@ -343,7 +343,7 @@
 
                 $properties = BuildSelectionArray($featureReader, $layerName, $properties,
                                                   $bComputedProperties,
-                                                  $srsLayer, $bNeedsTransform, $oLayer);
+                                                  $srsLayer, $bNeedsTransform, $oLayer, true);
                 $featureReader->Close();
             }
         }

Modified: sandbox/adsk/2.4j/layers/MapGuide/php/Selection.php
===================================================================
--- sandbox/adsk/2.4j/layers/MapGuide/php/Selection.php	2012-01-20 05:16:28 UTC (rev 2523)
+++ sandbox/adsk/2.4j/layers/MapGuide/php/Selection.php	2012-01-20 05:21:52 UTC (rev 2524)
@@ -78,7 +78,7 @@
         for ($i=0; $i<count($aSelectedLayers); $i++)
         {
             $layerName =  $aSelectedLayers[$i];
-            $layerNameInProperties = GetLayerNameInProperties($layerName);
+            $layerNameInProperties = GetEncodedLayerName($layerName);
             if (($bAllLayers || in_array($layerName, $aLayers)) &&
                 isset($properties->$layerNameInProperties) &&
                 $properties->$layerNameInProperties->numelements > 0)

Modified: sandbox/adsk/2.4j/layers/MapGuide/php/Utilities.php
===================================================================
--- sandbox/adsk/2.4j/layers/MapGuide/php/Utilities.php	2012-01-20 05:16:28 UTC (rev 2523)
+++ sandbox/adsk/2.4j/layers/MapGuide/php/Utilities.php	2012-01-20 05:21:52 UTC (rev 2524)
@@ -754,21 +754,26 @@
     return $val;
 }
 
-function GetLayerNameInProperties($layerName)
+function GetEncodedLayerName($layerName)
 {
-	return 'layer'.$layerName;    // Add prefix to avoid layer name beginning with number
+    return 'layer'.$layerName;    // Add prefix to avoid layer name beginning with number
 }
 
 /**
    keep all the attributes of selected features in an array
  */
 function BuildSelectionArray($featureReader, $layerName, $properties, $bComputedProperties,
-                             $srsLayer, $bNeedsTransform, $layerObj)
+                             $srsLayer, $bNeedsTransform, $layerObj, $isLayerNameEncoded)
 {
     $agf = new MgAgfReaderWriter();
     $srsFactory = new MgCoordinateSystemFactory();
     
-    $layerName = GetLayerNameInProperties($layerName);    // Add prefix to avoid layer name beginning with number
+    if($isLayerNameEncoded)
+    {
+        // Add prefix to avoid layer name beginning with number
+        // So $isLayerNameEncoded should be true when and only when the properties will be stored in session
+        $layerName = GetEncodedLayerName($layerName);    
+    }
 
     $properties->$layerName->propertynames = array();
     $properties->$layerName->propertyvalues = array();

Modified: sandbox/adsk/2.4j/widgets/FeatureInfo/featureinfocontroller.php
===================================================================
--- sandbox/adsk/2.4j/widgets/FeatureInfo/featureinfocontroller.php	2012-01-20 05:16:28 UTC (rev 2523)
+++ sandbox/adsk/2.4j/widgets/FeatureInfo/featureinfocontroller.php	2012-01-20 05:21:52 UTC (rev 2524)
@@ -93,7 +93,7 @@
                   $srsXform = null;
                   $bNeedsTransform = ($srsLayer->GetUnitScale() != 1.0);
               }
-              $properties = BuildSelectionArray($featureReader, $layerName, $properties, true, $srsLayer, $bNeedsTransform, $layer);
+              $properties = BuildSelectionArray($featureReader, $layerName, $properties, true, $srsLayer, $bNeedsTransform, $layer, false);
 
         }
 

Modified: sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php
===================================================================
--- sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php	2012-01-20 05:16:28 UTC (rev 2523)
+++ sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php	2012-01-20 05:21:52 UTC (rev 2524)
@@ -112,7 +112,7 @@
                 $options->SetFilter($resultSel->GenerateFilter($layer, $layerClassName));
                 $resourceId = new MgResourceIdentifier($layer->GetFeatureSourceId());
                 $featureReader = $featureSrvc->SelectFeatures($resourceId, $layerClassName, $options);
-                $properties = BuildSelectionArray($featureReader, $layerName, $properties, false, NULL, false, $layer);
+                $properties = BuildSelectionArray($featureReader, $layerName, $properties, false, NULL, false, $layer, true);
                 $featureReader->Close();
                 array_push($result->layers, $layerName);
                 array_push($properties->layers, $layerName);



More information about the fusion-commits mailing list