BUG
CircleEventArgs and MapCircleEventArgs are returning incorrect values for the ScreenRadius and MapRadius properties when using the ArcGIS Server .NET Web ADF.
This is a known issue.
Code:
public void ServerAction(ESRI.ArcGIS.ADF.Web.UI.WebControls.ToolEventArgs args)
{
Map mmap = args.Control as Map;
MapCircleEventArgs mcea = (MapCircleEventArgs)args;
double maptoscreenratio = mmap.Extent.Width / mmap.ViewWidth;
double mapradius = mcea.MapRadius / 4;
double screenradius = (mcea.MapRadius / 4) / maptoscreenratio;
System.Diagnostics.Debug.Print("Map To Screen Ratio: {0}", maptoscreenratio);
System.Diagnostics.Debug.Print("Map Radius: {0} units)", mapradius);
System.Diagnostics.Debug.Print("Screen Radius: {0} pixels)", screenradius);
}
Get help from ArcGIS experts
Download the Esri Support App