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

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Jun 6 07:25:18 PDT 2013


Author: jng
Date: 2013-06-06 07:25:17 -0700 (Thu, 06 Jun 2013)
New Revision: 2735

Modified:
   trunk/layers/MapGuide/php/GetSelectionProperties.php
Log:
Fix bad merge. Formatting and indentation. It prevents bad merges like this from happening!

Modified: trunk/layers/MapGuide/php/GetSelectionProperties.php
===================================================================
--- trunk/layers/MapGuide/php/GetSelectionProperties.php	2013-06-06 14:10:58 UTC (rev 2734)
+++ trunk/layers/MapGuide/php/GetSelectionProperties.php	2013-06-06 14:25:17 UTC (rev 2735)
@@ -76,25 +76,26 @@
                 /* the class that is used for this layer will be used to select  features */
                 $class = $oLayer->GetFeatureClassName();
 
-            /* select the features */
-            $queryOptions = new MgFeatureQueryOptions();
-            $geomName = $oLayer->GetFeatureGeometryName();
-            //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 ?
-            if (isset($_SESSION['property_mappings']) && isset($_SESSION['property_mappings'][$oLayer->GetObjectId()])) {
-                $mappings = $_SESSION['property_mappings'][$oLayer->GetObjectId()];
-            } else {
-                //This is normally pre-stashed by LoadMap.php, but if the client is using the new
-                //CREATERUNTIMEMAP shortcut, this information does not exist yet, so fetch and stash
-                $mappings = GetLayerPropertyMappings($resourceService, $oLayer);
-                $_SESSION['property_mappings'][$oLayer->GetObjectId()] = $mappings;
-            }
-            if (count($mappings) > 0) {
-                foreach($mappings as $name => $value) {
-                    if ($geomName != $name) {
-                        $queryOptions->AddFeatureProperty($name);
-                        //echo "$name $value <br>\n";
+                /* select the features */
+                $queryOptions = new MgFeatureQueryOptions();
+                $geomName = $oLayer->GetFeatureGeometryName();
+                //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 ?
+                if (isset($_SESSION['property_mappings']) && isset($_SESSION['property_mappings'][$oLayer->GetObjectId()])) {
+                    $mappings = $_SESSION['property_mappings'][$oLayer->GetObjectId()];
+                } else {
+                    //This is normally pre-stashed by LoadMap.php, but if the client is using the new
+                    //CREATERUNTIMEMAP shortcut, this information does not exist yet, so fetch and stash
+                    $mappings = GetLayerPropertyMappings($resourceService, $oLayer);
+                    $_SESSION['property_mappings'][$oLayer->GetObjectId()] = $mappings;
+                }
+                if (count($mappings) > 0) {
+                    foreach($mappings as $name => $value) {
+                        if ($geomName != $name) {
+                            $queryOptions->AddFeatureProperty($name);
+                            //echo "$name $value <br>\n";
+                        }
                     }
                 }
 
@@ -174,11 +175,11 @@
                 }
                 $result->layers = array();
                 for ($i=0; $i<$layers->GetCount(); $i++) {
-                  $layer = $layers->GetItem($i);
-                  $layerName = $layer->GetName();
-                  array_push($result->layers, $layerName);
-                  $layerClassName = $layer->GetFeatureClassName();
-                  $result->$layerName->featureCount = $selection->GetSelectedFeaturesCount($layer, $layerClassName);
+                    $layer = $layers->GetItem($i);
+                    $layerName = $layer->GetName();
+                    array_push($result->layers, $layerName);
+                    $layerClassName = $layer->GetFeatureClassName();
+                    $result->$layerName->featureCount = $selection->GetSelectedFeaturesCount($layer, $layerClassName);
                 }
 
                 /*save selection in the session*/



More information about the fusion-commits mailing list