/*********************************************************/
//
//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.
ZoomLevel控件允许用户快速的将地图缩放到一个特殊的比例。ZoomLevel控件显示了一个含有刻度的Bar,每一个刻度都代表地图的一个比例级别。当用户单击一个刻度,地图就会缩放到相应的比例。
用户也可以单击plus或者minus标记将地图缩放到相邻的级别。ZoomLevel控件仅仅和页面中的一个Map地图控件(ˇˍˇ) 相绑定。你可以将控件放置到页面中任何用户想想看到的位置。她可以被放置到一个表格或者其他的容器控件
Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.ZoomLevel
Using the ZoomLevel control
Add the controls to the page
使用ZoomLevel控件
向页面中添加控件
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.
在VS.NET中打开或者创建一个web站点。在设计模式下打开一个表格,选择工具箱然后展开ArcGIS Web 控件Tab。向页面中添加一个Map控件、一个ZoomLevel控件、一个MapResourceManager控件。
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:
添加一个或者多个资源到MapResourceManager控件,在MapResourceManager控件的部分查看AddResource章节获取如何操纵的相关信息。
Set ZoomLevel properties
设置ZoomLevel的属性
Select the ZoomLevel control. In the Properties page:
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.
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.
选中ZoomLevel控件,打开它的属性窗口
设置ZoomLevel控件的BuddyControl属性为你在前面添加的地图控件的属性,你应该从它的drop-down下拉列表里面选择地图控件。
其他的属性也许可能让他们保持默认的值,或者根据需要重新定义新的值。这些包括展示给用户的图片和web控件外表显示的通用设置。
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.
下面的表格提供了一系列的属性。更全面的引用信息,查看引用库中ZoomLevel控件的章节
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. |