[fusion-commits] r2540 - sandbox/adsk/2.4j/widgets/SelectWithin
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jun 26 18:49:54 PDT 2012
Author: liuar
Date: 2012-06-26 18:49:54 -0700 (Tue, 26 Jun 2012)
New Revision: 2540
Modified:
sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php
sandbox/adsk/2.4j/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.4j/widgets/SelectWithin/SelectWithin.php
===================================================================
--- sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php 2012-06-26 20:45:48 UTC (rev 2539)
+++ sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithin.php 2012-06-27 01:49:54 UTC (rev 2540)
@@ -100,7 +100,7 @@
$properties->extents->miny = $oMin->GetY();
$properties->extents->maxx = $oMax->GetX();
$properties->extents->maxy = $oMax->GetY();
- } else { echo "/* no extents */"; }
+ } else { echo "<Message>no extents</Message>"; }
//get properties for individual features
$result->layers = array();
@@ -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 "<Message>layers false or 0</Message>"; }
+ } else { echo "<Message>no resultsel</Message>"; }
+ } else { echo "<Message>no fi</Message>"; }
+ } else { echo "<Message>no multi geom</Message>"; }
+ } else { echo "<Message>no layers</Message>"; }
- 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.4j/widgets/SelectWithin/SelectWithinPanel.templ
===================================================================
--- sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithinPanel.templ 2012-06-26 20:45:48 UTC (rev 2539)
+++ sandbox/adsk/2.4j/widgets/SelectWithin/SelectWithinPanel.templ 2012-06-27 01:49:54 UTC (rev 2540)
@@ -98,7 +98,8 @@
function selectedSuccess(r) {
var mapWidget = GetParent().Fusion.getMapByName(mapName);
- mapWidget.processQueryResults(zoomTo, r);
+ var callback = GetParent().OpenLayers.Function.bind(mapWidget.processFeatureInfo, mapWidget);
+ GetParent().Fusion.xml2json(callback, r);
}
function selectedError(r) {
@@ -144,7 +145,7 @@
}
function GetParent()
-{debugger;
+{
if(popup)
return opener;
else
More information about the fusion-commits
mailing list