ArcGIS Zoom to USNG Coordinate Tool

Zoom to USNG Coordinate tool

This is my first shot at explaining the callback framework implemented in the ESRI ArcGIS Server Web ADF. So please feel free to ask questions if you get lost. Create two input html textboxes (not the System.Web.UI.WebControls textbox) and one input html button.

This callback raised by the client computer has to be handled and the response returned to the client by the server ie. Your default.aspx.cs page in your web mapping application.

/* Default aspx.cs – Code behind page of the Default page of your application. This following code snippets must be added to the default page to create the “Zoom to USNG tool.

1.Make sure the ICallbackEventHandler is implemented in your default class.

2. Declare the string variables for the Callback invocation function (sCallBackFunctionInvocation )and the response string (mapstring) and save the orginal scale of the map when it loads initially.

3. The raisecallback event handler parses and decodes the callback string and passes the “USNGLocationlabel” and the “USNGPoint” to the ZoomtoPointServer function.

4. ZoomtoPointServer function does the reverse of the USNG Coordinate tool – ie, it converts the typed in USNG Coordinate to a annotated point graphic on the map, changes the map scale to the correct precision to zoom to that location.