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

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu May 1 05:18:46 PDT 2014


Author: jng
Date: 2014-05-01 05:18:46 -0700 (Thu, 01 May 2014)
New Revision: 2833

Modified:
   trunk/layers/MapGuide/MapGuide.js
Log:
Fix for http://trac.osgeo.org/mapguide/ticket/2439

This is not a true fix, as it exposes a defect in v2.6 QUERYMAPFEATURES (the selection image rendering has point testing logic that the selected feature attribute rendering does not), but this will at least allow Fusion to gracefully handle such a situation in the meantime

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2014-05-01 12:16:25 UTC (rev 2832)
+++ trunk/layers/MapGuide/MapGuide.js	2014-05-01 12:18:46 UTC (rev 2833)
@@ -1799,6 +1799,7 @@
             
             for (var i = 0; i < selLayers.length; i++) {
                 var selLayer = selLayers[i];
+                var selFeatures = selLayer.Feature || [];
                 var layerName = selLayer["@name"];
                 if (!result[layerName]) {
                     if (selLayer.LayerMetadata) {
@@ -1816,7 +1817,7 @@
                     result[layerName] = {
                         metadata: [],  //NOTE: Probably a defect, but regular code path is putting blank string arrays here too
                         metadatanames: ["dimension", "bbox", "center", "area", "length"],
-                        numelements: selLayer.Feature.length,
+                        numelements: selFeatures.length,
                         propertynames: pnames,
                         propertytypes: ptypes,
                         propertyvalues: pvals,
@@ -1825,8 +1826,8 @@
                     layerNames.push(layerName);
                 }
                 
-                for (var j = 0; j < selLayer.Feature.length; j++) {
-                    var feat = selLayer.Feature[j];
+                for (var j = 0; j < selFeatures.length; j++) {
+                    var feat = selFeatures[j];
                     var featVals = [];
                     if (feat.Property) {
                         for (var k = 0; k < feat.Property.length; k++) {



More information about the fusion-commits mailing list