HOW TO

Change the Zoom factor for a point task result

Last Published: April 25, 2020

Summary

When using the Zoom To context menu option for a point geometry result in an ArcGIS Server for the .NET Framework Web application, the map does not zoom in on the point or may even zoom out.

By default, the zoom factor for this action is 1/20th the full extent of the point layer. Increasing the ZoomToPointFactor property of the TaskResults control results in a larger scale while decreasing it results in a smaller scale. This value can be changed by modifying the Web application in Notepad or in Visual Studio.

Procedure

The steps below involve modifying the ZoomToPointFactor property of the TaskResults control.

Warning:
ESRI Support Services highly recommends making a backup copy of your Web application before proceeding with the following steps.

  • In Notepad:

    1. On the Web server, browse to:
    c:\inetpub\wwwroot\<web_site_name>

    2. Right-click Default.aspx and open with Notepad.

    3. Use the Edit menu > Find tool to locate 'esri:TaskResults' (without quotes).

    4. At the end of this line, before the tag close ( />), add 'ZoomToPointFactor="100"' (without the single quotes, but double quotes around the 100). It is possible to increase this number if the ZoomTo function still does not zoom in enough.

    5. Save this file.

    6. Test the Web application. If a larger scale is needed, increase this value. If a smaller scale is needed, decrease this value.
  • In Visual Studio:

    1. Open the properties for the TaskResults Control.

    2. Modify the ZoomToPointFactor value to be 100.

    3. Test the application. If a larger scale is needed, increase this value. If a smaller scale is needed, decrease this value.

Article ID:000010434

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic