ZoomLevel control


In this topic


About the ZoomLevel control

Use the ZoomLevel control to zoom to a scale on a map. The control displays a bar with several cross-tics (each tic represents a scale level on the map). When you select a tic, the map zooms to the corresponding scale. You can also click the plus or minus signs to zoom to the next scale level. The ZoomLevel control buddies to one Map control on the page. Place the control on the page where you want it viewed (can be placed in a table or other containing control).

Using the control

  1. To add controls to the page, open or create a Web site in Visual Studio. Open a Web form in design mode, select the Toolbox panel, and expand the ArcGIS Web Controls tab. Drag and drop a Map control, ZoomLevel control, and a MapResourceManager control onto the Web form. 
  2. Add one or more resources to the MapResourceManager and set the Map control's MapResourceManager property to Map1. See the following screen shot that shows the page in Visual Studio:


  3. To set the ZoomLevel control properties, select the ZoomLevel control. Do the following on the Properties window:
    1. Set the BuddyControl property of the ZoomLevel control to the Map control previously added. Select this Map control from the drop-down list.
    2. Other property settings can remain as the defaults or can be modified. These include the images shown to the user and appearance settings common to Web controls. See the following screen shot:

Members

The following table shows a list of properties related to the ZoomLevel control. For more reference information, see the ZoomLevel control in the library reference section.
Property name
Type
Description
BottomImage
string
Image shown at the lowest zoom level end of the zoom level control.
DefaultImage
string
Image shown for a non-selected zoom level.
ImagePath
string
Location of the images used by the zoom level control.
Map
string
Map control to associate with the ZoomLevel control.
Orientation
ZoomOrientation
Determines if the control is oriented vertically or horizontally.
SelectedImage
string
Image shown for the selected zoom level.
TopImage
string
Image shown at the lowest zoom level end of the zoom level control.


See Also:

Web ADF controls
Customizing the Web Mapping application




To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
  • ESRI.ArcGIS.ADF.Web.UI.WebControls.dll