[mapguide-commits] r9136 - in sandbox/adsk/3.2o.AIMS/Web/src: mapviewernet viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Mar 13 00:26:52 PDT 2017
Author: hubu
Date: 2017-03-13 00:26:52 -0700 (Mon, 13 Mar 2017)
New Revision: 9136
Modified:
sandbox/adsk/3.2o.AIMS/Web/src/mapviewernet/selectwithin.aspx
sandbox/adsk/3.2o.AIMS/Web/src/viewerfiles/selectwithinui.templ
Log:
#2764 Select Within returns all features when actually no result should be found
Clear selection if there is no features in the polygon.
Modified: sandbox/adsk/3.2o.AIMS/Web/src/mapviewernet/selectwithin.aspx
===================================================================
--- sandbox/adsk/3.2o.AIMS/Web/src/mapviewernet/selectwithin.aspx 2017-03-10 08:21:34 UTC (rev 9135)
+++ sandbox/adsk/3.2o.AIMS/Web/src/mapviewernet/selectwithin.aspx 2017-03-13 07:26:52 UTC (rev 9136)
@@ -1,5 +1,5 @@
<%--
-Copyright (C) 2004-2011 by Autodesk, Inc.
+Copyright (C) 2017 by Autodesk, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of version 2.1 of the GNU Lesser
General Public License as published by the Free Software Foundation.
@@ -50,6 +50,7 @@
site.Open(cred);
MgFeatureService featureSrvc = site.CreateService(MgServiceType.FeatureService) as MgFeatureService;
MgRenderingService renderingSrvc = site.CreateService(MgServiceType.RenderingService) as MgRenderingService;
+ MgResourceService resourceSrvc = site.CreateService(MgServiceType.ResourceService) as MgResourceService;
//load the map runtime state
//
@@ -79,8 +80,16 @@
if(resultSel != null)
{
// Return XML
- Response.AddHeader("Content-type", "text/xml");
- Response.Write(resultSel.ToXml());
+ resultSel.Save(resourceSrvc, mapName);
+ //this needs to be re-opened for some reason
+ resultSel = new MgSelection(map);
+ resultSel.Open(resourceSrvc, mapName);
+ MgReadOnlyLayerCollection resLayers = resultSel.GetLayers();
+ if (resLayers != null && resLayers.GetCount() >= 0)
+ {
+ Response.AddHeader("Content-type", "text/xml");
+ Response.Write(resultSel.ToXml());
+ }
}
}
}
Modified: sandbox/adsk/3.2o.AIMS/Web/src/viewerfiles/selectwithinui.templ
===================================================================
--- sandbox/adsk/3.2o.AIMS/Web/src/viewerfiles/selectwithinui.templ 2017-03-10 08:21:34 UTC (rev 9135)
+++ sandbox/adsk/3.2o.AIMS/Web/src/viewerfiles/selectwithinui.templ 2017-03-13 07:26:52 UTC (rev 9136)
@@ -90,6 +90,8 @@
reqHandler.send(reqParams);
if(reqHandler.responseXML)
GetParent().SetSelectionXML(reqHandler.responseText);
+ else
+ GetParent().GetMapFrame().ClearSelection();
}
catch(e) {}
GetParent().GotoHomePage();
More information about the mapguide-commits
mailing list