The events Map::Point and Map::DragRectangle do not result expected values.
Last Published: August 25, 2014No Product Found
Bug ID Number
NIM033913
Submitted
April 4, 2008
Last Modified
June 5, 2024
Applies to
No Product Found
Version found
9.3
Version Fixed
N/A
Status
Fixed
The bug has been fixed. See the Version Fixed and Additional Information, if applicable, for more information.
Workaround
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]); }}