The events Map::Point and Map::DragRectangle do not result expected values.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM033913
已提交
April 4, 2008
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.3
修正版本
N/A
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
The custom Point tool and custom DragRectangle tool work without problem by implementing the IMapServerToolAction interface.Workaround:Parse out the map coordinates for the map click event, not from the args.ScreenPoint (which does not now work because of the bug), but rather, from the Page.Request.Params.public partial class AddArgumentsToTool : System.Web.UI.Page { protected void Map1_MapClick(object sender, ESRI.ArcGIS.ADF.Web.UI.WebControls.PointEventArgs args) { //args.ScreenPoint = 0,0 because of NIM033913, so, instead: System.Collections.Specialized.NameValueCollectionnameValueCollectionInsideArg = null; // Check whether the page request was issued using a callback or a postback. A callback is used if no // ScriptManager is on the page containing the tool. Otherwise, a partial postback is used. if (Page.IsCallback) { // Get the callback arguments from the __CALLBACKPARAM argument of the page request parameters string callbackArguments =Page.Request.Params["__CALLBACKPARAM"]; nameValueCollectionInsideArg = ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackUtility.ParseStringIntoNameValueCollection(callbackArguments); } else { // Get the postback event arguments from the __EVENTARGUMENT argument of the page request parameters string postbackEventArguments = Page.Request.Params["__EVENTARGUMENT"]; nameValueCollectionInsideArg = ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackUtility.ParseStringIntoNameValueCollection( postbackEventArguments); } string sCoordinate = nameValueCollectionInsideArg["coords"]; string [] sCoordinates = sCoordinate.Split(new char[] { ':' }); double nX = System.Convert.ToDouble(sCoordinates[0]); double nY = System.Convert.ToDouble(sCoordinates[1]); }}