Developing Web Applications with the Web ADF - Web controls  

ZoomLevel control



The ZoomLevel control allows the user to zoom quickly to a particular scale in a Map. The control displays a bar with several cross-tics, each tic representing a scale level in the map. When the user clicks on a tic, the map zooms to the corresponding scale. The user can also click on the plus or minus signs to zoom to the next scale level. The ZoomLevel control buddies to one Map control on the page. You can place the control on the page where you want users to see it. It can be placed within a table or other containing control.

Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.ZoomLevel

Using the ZoomLevel control
  1. Add the controls to the page

    Open or create a Web site within Visual Studio.NET.   Open a Web form in design mode, select the Toolbox, and expand the ArcGIS Web Controls tab.  Drag and drop a Map control, a ZoomLevel control, and a MapResourceManager control onto the Web form. 

    Add one or more resources to the MapResourceManager.  See the Add Resources section in the MapResourceManager control topic for information on how to do this. Also set the Map control's MapResourceManager property to Map1. See Map Control for information on setting this property. Your page should resemble the following in Visual Studio.NET:

      
  2. Set ZoomLevel properties

    Select the ZoomLevel control.  In the Properties page:
    1. Set the BuddyControl property of the ZoomLevel control to the Map control you added earlier. You should be able to select this Map control from the drop-down list.
    2. Other property settings may be left at their defaults, or may be modified as desired. These include the images displayed to the user and appearance settings common to web controls.   

Members

Properties

  The following table provides a list of properties of interest.  For complete reference information, see the ZoomLevel control in the library reference section.

Property Name  Type Description
BottomImage string The image displayed at the lowest zoom level end of the zoom level control.
DefaultImage string The image displayed for a non-selected zoom level.
ImagePath string The location of the images used by the zoom level control.
Map string The Map Control to associate with this ZoomLevel Control.
Orientation ZoomOrientation Whether the control is oriented vertically or horizontally.
SelectedImage string The image displayed for the selected zoom level.
TopImage string The image displayed at the lowest zoom level end of the zoom level control.