[fusion-commits] r2532 - sandbox/adsk/2.3r/widgets/SelectWithin
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Apr 23 02:33:30 EDT 2012
Author: liuar
Date: 2012-04-22 23:33:30 -0700 (Sun, 22 Apr 2012)
New Revision: 2532
Modified:
sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithin.php
sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithinPanel.templ
Log:
Fix Defect - SelectWithin doesn't work with Shift+Click select
This is because SelectWithin doesn't update the selection set in browser side.
Modified: sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithin.php
===================================================================
--- sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithin.php 2012-03-21 02:57:37 UTC (rev 2531)
+++ sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithin.php 2012-04-23 06:33:30 UTC (rev 2532)
@@ -122,15 +122,15 @@
/*save selection in the session*/
$_SESSION['selection_array'] = $properties;
- } else { echo "/* layers false or 0 */"; }
- } else { echo "/* no resultsel */"; }
- } else { echo "/* no fi */"; }
- } else { echo "/*no multi geom*/"; }
- } else { echo "/* no layers */"; }
+ echo str_replace("</FeatureSet>", "</FeatureSet></FeatureInformation>", str_replace("<FeatureSet", "<FeatureInformation><FeatureSet", $resultSel->ToXml()));
+ } else { echo "<!--layers false or 0-->"; }
+ } else { echo "<!--no resultsel-->"; }
+ } else { echo "<!--no fi-->"; }
+ } else { echo "<!--no multi geom-->"; }
+ } else { echo "<!--no layers-->"; }
- header('Content-type: application/json');
- header('X-JSON: true');
- echo var2json($result);
+ //return XML
+ header("Content-type: text/xml");
} catch(MgException $e) {
echo "\nException: " . $e->GetDetails();
return;
Modified: sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithinPanel.templ
===================================================================
--- sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithinPanel.templ 2012-03-21 02:57:37 UTC (rev 2531)
+++ sandbox/adsk/2.3r/widgets/SelectWithin/SelectWithinPanel.templ 2012-04-23 06:33:30 UTC (rev 2532)
@@ -100,7 +100,8 @@
function selectedSuccess(r) {
var mapWidget = GetParent().Fusion.getMapByName(mapName);
var map = mapWidget.aMaps[0];
- map.processQueryResults(zoomTo, r);
+ var callback = GetParent().OpenLayers.Function.bind(map.processFeatureInfo, map);
+ GetParent().Fusion.xml2json(callback, r);
}
function selectedError(r) {
@@ -146,7 +147,7 @@
}
function GetParent()
-{debugger;
+{
if(popup)
return opener;
else
More information about the fusion-commits
mailing list