laptop and a wrench

Bug

MapCircleEventArgs and CircleEventArgs do not report the right Screen and Map radius.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM036015
SubmittedJune 11, 2008
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.3
Program languageC#
Version FixedN/A
StatusFixed

Description

CircleEventArgs and MapCircleEventArgs are returning incorrect values for the ScreenRadius and MapRadius properties when using the ArcGIS Server .NET Web ADF.

Cause

This is a known issue.

Workaround

Access the MapCircleEventsArgs MapRadius property and perform additional calculations. To determine the correct map radius, divide the MapCircleEventsArgs MapRadius value by 4. To determine the correct screen radius, divide the MapCircleEventsArgs MapRadius value by 4 and then divide the result by the map to screen ratio (resolution).

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);
}

    Steps to Reproduce

    Bug ID: NIM036015

    Software:

    • No Product Found

    Get notified when the status of a bug changes

    Download the Esri Support App

    Discover more on this topic

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options