博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年7月27日_周二_introduction_to_web_controls

Posted on 2010-07-28 08:13  星尘的天空  阅读(601)  评论(0编辑  收藏  举报

/***************************************************************/

//introduction to web controls

//2010年7月27日

//creating arcgis server solutionàdeveloping application

//àdevelopint web application using the web adf

//àweb controls

//àintroduction to web control

/***************************************************************/

 

The Web ADF includes a set of Web controls to enhance the Web developer experience and provide a rapid application development environment.  All Web ADF controls are designed to work asynchronously(异步) within a Web application by utilizing AJAX patterns included with ASP.NET.   All Web ADF controls can be considered script control because they implement the ASP.NET AJAX System.Web.UI.IScriptControl interface.   This means that you can interact with Web ADF controls via JavaScript in the client browser if they have a scriptable implementation.  The Web ADF includes a comprehensive public JavaScript Library which can be used to work with scriptable controls and enhance a Web application using client side logic.   

 

Web ADF 包含了一系列的web 控件去增强web开发人员的经验,并且为其提供来一个快速的应用程序开发环境。所有的Web ADF利用AJAX patterns included with ASP.NET.技术被设计为在应用程序中为异步工作。所有的Web ADF 控件都可以认为是可以用脚本编辑的,因为他们都实现了ASP.NET AJAX System.Web.UI.IscriptContrl 接口。这就意味着,如果他们有一个脚本可编辑的环境,那么他们就可以通过JavaScript脚本在客户端的浏览器端和这些web adf 控件进行交互操作。Web adf 包含一个综合的公共JavaScript库,他可以用于支持脚本编辑的控件并且能够使用客户端的逻辑操作来增强一个web 应用程序。

 

Web ADF controls leverage(力量,影响) the Common Data Source API to interact with multiple sources of data as resources.  In most cases, resources are managed by a set of "resource manager" controls.  Other controls consume the managed resources  directly or via another control.  The diagram below illustrates the property relationships between Web ADF Core and Task framework controls and data sources supported out-of-the-box.  For example, the MapTips control uses the MapResourceManager to select a resource and layer on which to construct map tips and can be buddied with a Map control to display the map tips.   Likewise(同样的), the SearchAttributesTask uses the MapResourceManager to select the resources, layers, and fields in which to search.  The task can be buddied with a TaskResults control to display tabular results and the TaskResults control can be buddied with a Map control to display graphic results. 

 

Web ADF控件影响着公共数据源API与多个数据源进行交互。在多数情况下,资源被一系列的资源管理器控件管理着。其他的空间可以直接来利用这些资源也可以通过其他的控件来利用。下面的图标阐明来web apf 内核、任务框架控件和被工具箱支持的数据源之间的属性的关系。比如:map提示控件使用mapResourceManager管理器来选择一个资源以及图层,然后再他们上面来创建地图提示信息,她还可以与一个地图控件绑定来显示地图的提示信息。同样的,searchattributesTask使用mapResourceManager来选择用来搜索的资源、图层、字段值,她可以与一个taskResults 控件绑定来显示查询的结果,并且taskresults控件还可以与地图控件绑定,展示图标结果。

 

 

 

The following sections(章节) provide a brief(简短的) description of each Web control included with the Web ADF. 

下面的各节简明扼要的介绍来包含在web adf 中的每一个控件

 

MapResourceManager

//地图资源管理器
The MapResourceManager control is often the first control added to a Web application.

The design-time interface allows you to add, remove, and set properties for any resource that provides mapped output, for example an ArcIMS Image Service or an ArcGIS Server map service.   Since the control is designed to manage multiple resources at the same time, it provides properties to define how the resources interact, such as the order of layers and transparency of map image output.   Multiple controls can use the same MapResourceManager to access the same set of resources.   As a result, changes to a resource by one control can be reflected in other controls associated with the same MapResourceManager.    

 

MapResourceManager通常都是第一个添加到web应用程序中的控件,在界面设计的时候,允许你添加,移动设置提供的地图输入的资源。比如:一个ArcIMS图像服务或者一个ArcGIS Server 地图服务。因此这个控件设计的就是在同时对多个资源进行管理,她提供来一些属性来设置如何和这些数据源进行交互,比如图层的索引值,以及图片输出的透明度。多个控件可以使用mapResourcesManager去访问同一个资源。这样,当一个资源被一个控件改变后,其他的通过相同的mapResourcesManger和这个资源相关联的控件也会受到关联。

 

Map 

The Map control is designed to display geographic data from one or more resources provided by different data source types.   It must be associated with a MapResourceManager to define the resources displayed within the map.   Multiple resources displayed in the same map are blended(混合) together and rendered(使得、致使) as a single image.  Since each service is treated as a separate layer within the map, you can use the MapResourceManager to set transparency(透明度) levels for each resource.  Advanced map tool functionality enables continuous panning and zooming capabilities without reloading the Web page that contains the map, and a full postback is not required.  In addition, game style navigation provides scroll-wheel zoom and keyboard navigation options at runtime.  A number of other Web ADF controls buddy with the map control to enhance the user experience(增强了用户体验) with the map, such as the Toolbar, Navigation, MapTips, and ZoomLevel controls.   

地图控件

       地图控件被设计为展示来自一个多个地图资源的几何图形,这些资源可以是来自多个数据类型。地图控件必须和一个MapresourceManager控件想关联,来定义在地图控件中展示的资源。在地图控件中显示的多个资源被混合在一起,使得他们作为单一的图像。因为每一个服务在地图上都被当做一个图形,因此你可以使用mapResourceManager来为每一个资源设置他们的透明度。先进地图工具功能提供来连续的移动、缩放地图的功能而不是重新加载包含地图控件的页面,并且也不会请求一个回调。另外,游戏风格的导航提供了滚轮变焦以及键盘导航的在运行状态下的应用。许多其他的web adf 控件和map控件绑定,增强了题图上的用户体验,比如:工具条,导航条,地图信息提示控件,以及地图缩放控件。

 

ColorPicker
       The ColorPicker control provides a runtime dialog which can be used to select a color.  It can be incorporated into(3:被合并到) a page or control (e.g. custom task) to provide an end user with the ability to select a color.   The selected color can be used to define properties for a component within the application or control.   

拾色器:

       拾色器控件提供了一个运行对话框,用来可以选择一个颜色。拾色器还可以被集成到一个页面以及一个空间里面,最终给用户提供一个选择颜色的能力。选择的颜色可以用来定义程序或者控件的属性。

 

ContextMenu

The ContextMenu control is designed to display a dialog upon a right-click event (onContextMenu event) on an element in a browser at runtime.  The element can be a Web control such as a Map, the contents of a control such as a node in TaskResults, or any client-side element on which an event can be triggered(触发,引起),   A ContextMenu contains one or more items which the end user can select to initiate an action. 

ContextMenu被设计为程序运行的时候当在一个元素上单击鼠标右键的时候,弹出一个对话框。元素可以是一个网络上的控件比如地图控件,或者控件的内容,比如:taskresults控件上面的一个节点,或者客户端的任何一个可以触发事件的元素,一个ContextMenu可以包含一个或者多个菜单项,用户可以选择这些菜单项来触发一动作。

 

DockExtender
The DockExtender control allows a developer to dock(控制) a target control within a Map control.   Target controls often include an OverviewMap, ScaleBar, ZoomLevel and\or Navigation control.  At runtime, the target control will be anchored(固定) to a Map control at a predefined location: a corner, a side or the center of the Map control.

DockExtender控件允许一个开发者控制一个目标控件在一个地图控件的范围内。目标控件包含一个全局预览地图控件,一个比例尺控件,一个缩放控件或者一个导航控件,在运行的时候,目标控件将会被固定在地图控件上一个预先定义好的位置,比如:一个角落,地图控件的旁边,或者地图控件的中心位置。
FloatingPanel
The FloatingPanel control provides a floating window within a Web page that can contain other controls.  You can drag-and-drop, resize, and minimize the window within the browser.  Often FloatingPanels are used to enhance the usability and appearance of a Web page. When you add an OverviewMap or Toolbar to a floating panel, it can be minimized when not in use or dragged to a new location on the screen.

浮动面板

FloatingPanel控件提供来一个在web页面内可以浮动的窗口,里面可以包含其他的控件,你可以在浏览器内部对他进行拖拽,重新设置大小,最小化窗口。通常情况下浮动面板是用来增强页面体验的。当你想FloatingPanel中添加一个鹰眼图或者一个工具条的时候,她可以被最小化或者拖动到屏幕上的一个新的位置。


GeocodeResourceManager
The GeocodeResourceManager control allows a developer to add, remove, and set properties for any resource that provides geocoding services.   ArcGIS Server, ArcIMS and ArcWeb data sources can be utilized.  The FindAddressTask control is designed to use the resources provided by the GeocodeResourceManager to geocode address inputs. 

GeocodeResourceManager 允许开发者添加、删除和设置任何提供地理编码服务的资源的属性。ArcGIS Server ,ArcIMS和ArcWeb 数据源可以被利用,FindAddressTask控件被设计为使用由GeocodeResourceManager提供的资源来进行地理编码

GeoprocessingResourceManager
The GeoprocessingResourceManager control allows a developer to add, remove and set properties for any resource that provides geoprocessing services.   Only ArcGIS Server geoprocessing services are supported at this time.  The GeoprocessingTask control is designed to use the resources provided by the GeoprocessingResourceManager to work with(同傻傻一起工作) geoprocessing tasks on the server. 

GeoprocessingResourceManager 允许开发者添加、删除和设置任何提供地理处理服务资源的属性。只有ArcGISServer 此时支持这个地理处理服务。GeoprocessingTask控件被设计为使用由GeoprocessingResourceManager提供的资源在服务器上同地理处理一起工作。

 

 


HoverExpandExtender
The HoverExpandExtender control adds the ability to change the opacity(透明度) or image display behavior of a control. The targeted control will alternate(交替的,交互的) between opacity values and/or images when the mouse hovers over or does not hover over the control.
HoverExpandExtender控件增加来改变一个控件透明度或者图显示行为的功能。目标控件将会交替的现实不同值之间的透明度或者不同的图片当鼠标悬停或者离开控件的时候。


Magnifier
The Magnifier(放大镜) control extends the FloatingPanel control to provide a floating window which contains a map of a resource in the buddied Map control.  The map in the Magnifier control zooms in on the underlying(在**下面) Map control to show more detail without changing the extent of the map in the Map control.   A crosshair in the center of the Magnifier control enables the user to position the control over the Map to select an area to view.  A scale factor drop down list (from 2x to 10x the current Map extent) enables the user to select how much they want to zoom in on the Map.   

Magnifier控件扩展来FloatingPanel控件的功能,提供来一个浮动的窗口,里面包含一个和地图控件想绑定的地图资源。在Magnifier中的地图就会放大下面的地图控件显示更加详细而不用改变地图控件中地图的显示范围。Magnifier控件中间的十字丝能够让用户在地图上方定位来选择要查看的区域。一个比例尺下拉框允许用户选择地图要放大的程度。

MapCopyrightText
Displays interactive copyright text when associated with a Map control. 
当和地图关联的时候以文本的形式显示地图的版权信息。

 


MapTips
The MapTips control provides the ability, at runtime, to hover the mouse over a point feature in a map and instantly(立刻) display attribute information about the specific feature.   The control uses client-side logic in the browser to display features on top of the map control.   The MapTips control uses attribute information in a point feature layer, accessed via a resource in a MapResourceManager.  MapTips can retrieve(重新得到,重新获得) information from a resource in one MapResourceManager and display it in another unrelated Map control.

地图小贴士

在运行的时候,MapTips 控件提供一个这样的功能,当鼠标悬停在地图上的一个要素的时候,立刻就会显示这个指定的要素的属性信息。控件在浏览器中使用客户端逻辑在地图控件的上方显示要素。  通过MapResourceManager控件的资源来访问。MapTips控件可以重新获取MapResourceManager中的一个资源的信息,然后展示在另外一个毫不相关的地图控件上面。

Navigation

The Navigation control is associated with a single map control.  It provides common map navigation functions (pan and zoom) in a single control.  The control can also be moved dynamically on the Web page at runtime, thus an application user can choose the location of the control. 

导航控件

       Navigation控件和一个单独的地图控件想关联,他提供来通用的地图导航功能(平移和缩放)。导航控件在页面运行的时候也可以在页面中异步的移动。因此应用程序用户可以选择这个空间的位置。



OverviewMap

The OverviewMap control is similar to the Map control in that it displays geographic data.  However, the purpose of an overview map is to provide a point of reference for the area displayed on its associated Map control.  The OverviewMap control always displays greater extent than its associated map control.  An area of interest box on the overview map represents the currently displayed area on its associated Map control.   Note that the OverviewMap and Map control can use two different MapResourceManagers, thus different sources of data. 
鹰眼控件

OverviewMap是一个功能和地图控件很相似的空间,她可以展示地理数据。尽管如此,OverviewMap控件的目的就是为来提供一个与他相关的地图控件的一个参考点。OverviewMap控件总是比与他相关的地图控件显示一个更大的范围。在OverviewMap控件中的一个小盒子代表着与之相关联的地图控件当前显示的区域。需要注意的是,OverviewMap控件和地图控件可以使用不同的MapResourceManagers控件。

 


PageLayout
The PageLayout control displays the layout of a map and is analogous(相似的) to layout view in ArcMap.  It displays all of the map elements, including data frames and any map surrounds, such as north arrows and scale bars.  The PageLayout control is only supported for use with ArcGIS Server Local data sources. 
页面布局控件

PageLayout 控件显示地图的布局,并且与ArcMap控件中的视图布局是很相似的,她显示所有的地图元素,包括数据框架和任何的地图周边元素,比如:指北针和比例尺。PageLayout

控件仅仅被支持用于ArcGIS Server本地的数据源。


ScaleBar
The ScaleBar control provides a simple scalebar for the map.  It uses ArcGIS Server or ArcIMS resources in a Map control to calculate relative scale and construct the control.  
比例尺

ScaleBar 提供来一个和地图scalebar控件非常相似的控件,她使用地图控件中的ArcGIS Server或者ArcIMS资源来计算相对的比例尺然后控制地图。


Toc
The table of contents, or Toc control,  lists the layers on the map and shows what the features represent.  A toc is buddied with a map control.  As a result, checking a layer in the toc control will draw it in the map control.  Each resource associated with a map control may contain one or more layers, thus the toc control represents each resource as a grouplayer; essentially(事实上) a layer that contains layers.    
TOC

Toc的意思是内容表或者TOC控件,列出了地图控件上的图层以及显示她所他代表的要素。

一个toc控件与一个地图控件绑定。 结果是,检查一个将被在地图控件上绘制的目标图层。和地图控件想关联的每个资源肯能包含一个或者多个地图图层,因此toc控件代表每一个资源的图层组合。事实上一个图层还可能包含多个图层。
Toolbar
The Toolbar control can be associated with one or more map controls.  Toolbars contain functions for working with a map, such as common navigation tools like pan and zoom.  Custom tools can be added to the toolbar to enhance the capabilities of a Web application.  

一个工具条控件可以和多个地图控件想关联,工具条控件包含与地图相关的功能。比如:一个普通的导航工具比如,平移和缩放。自定工具可以被添加到工具条里面扩展网络应用程序的功能。



TreeViewPlus
The TreeViewPlus control is container designed to present information at runtime in a nested structure of nodes (tree).  Two Web ADF controls build on its framework: TaskResults and Toc.   In gene 

TreeViewPlus 是一个容器控件,被设计为在运行的时候以节点集合的方式来展示信息。两个Web ADF控件可以使用它的架构:TaskResults控件和TOC控件。


 
ZoomLevel
The ZoomLevel control provides a set of levels, or map scales, representing different static extents the map control can zoom to.  The map control must reference a resource that contains at least one static layer, for example, an ArcGIS Server MapServer with a cached data layer.  When created, the cached data layer defines a set of levels, or scales, at which cached data was generated.  The ZoomLevel control uses these levels to define the number of segments displayed by the control.     
缩放条控件

ZoomLevel控件提供来一系列的水平或者地图比例尺,代表地图控件可以缩放到的固定的显示范围。地图控件比如所引用的资源必须至少包含一个固定的图层,比如:ArcGIS Server地图服务包含一个cached数据层。当创建的时候,缓存的数据层定义来一系列的级别或者比例,缓存就是在这些比例下创建的。ZoomLevel控件就是使用这些比例来定义被控件显示的部分的数目。


TaskManager
The TaskManager control is designed to organize tasks in a Web application.   The TaskManager control generates hierarchical (按照等级的)XML data that can be used by an ASP.NET navigation control such as a Menu or TreeView.  At runtime, nodes in the ASP.NET Menu or TreeView can be used to display the floating panel for a task.  It is only visible at design-time. 

任务管理器

TaskManager 被设计为在web应用程序中来组织任务。TaskManager控件生成有等级的XML文件,这些文件可以被ASP.NET导航控件利用比如:一个菜单,或者一个目录树。在运行的时候,asp.net中的菜单或者目录树中的节点可以被用来显示任务浮动面板。她只有在设计的时候才是可见的。




TaskResults
The TaskResults control is designed to store the results of tasks that produce ADO.NET DataSet output.  The results are presented as nodes in a TreeView.  The TaskResults control also enables the ability to zoom or pan to a feature, highlight a feature in a result set, re-run a task, or remove task results.  

任务结果控件

TaskResults控件被设计为存储ADO.NET数据集输出结果的控件。这些结果在目录树控件中以节点的形式被展现。TaskResults控件实现来缩放和平移地图要素、高亮结果集合中的要素的功能。

EditorTask
The EditorTask control provides a suite of tools for Web-based editing of features in both versioned and non-versioned enterprise geodatabases.   If configured, specific versions can be selected for editing.  The runtime dialog provides tool to modify, add, and remove feature geometry and attributes.   

EditorTask控件提供来一套基于web的要素编辑的工具,如果进行配置,可以指定选择的版本进行编辑。 运行的对话框提供了工具进行重定义,添加或者移除几何要素和属性。

FindPlaceTask
The FindPlaceTask control is designed to use ArcWeb services that provide searchable place name layers.  The control interface includes a simple textbox to enter a place name.  The results are provided as an ADO.NET DataSet to be displayed in a TaskResults control.  
FindPlaceTask 控件被设计为使用能够提供地名搜索层的ArcWeb服务。控件界提供了一个可以输入地名的文本框。 结果以ADO.NET数据集的形式显示在任务结果控件上。
FindAddressTask
The FindAddressTask control utilizes resources in the GeocodeResourceManager to perform geocode operations.  The control interface is created dynamically at runtime based on the inputs required by the geocode resource it will use.  The results are provided as an ADO.NET DataSet to be displayed in a TaskResults control. 

搜索地址任务。

FindAddressTask 控件利用GeocodeResourceManager控件中的资源来执行地理编码的操作。

基于将要使用的地理编码资源所要求的输入,空间界面在运行的时候将会被动态的创建。

查询结果将会以一个ADO.NET数据集的形式在TaskResults 控件中显示

 


GeoprocessingTask
The GeoprocessingTask control utilizes resources in the GeoprocessingResourceManager to execute geoprocessing tasks.   The control interface is created dynamically at runtime based on the inputs required by the geoprocessing resource and task it will use.  The results, which include input and output parameters as well as progress messages, are provided as an ADO.NET DataSet to be displayed in a TaskResults control. 

地理处理工作

GeoprocessingTask 控件利用GeoprocessingResourceManager中的资源来执行地理处理任务。控制界面将会在运行的时候动态的创建基于地理处理要去的输入的结果并且将会被使用。运行的结果,包括输入和输出参数以及处理结果信息,将会以一个ADO.NET 数据集的形式显示在任务结果控件里面
PrintTask
       The PrintTask control provides runtime print capabilities to a Web ADF application.  It enables users to print a map and task results, along with a legend, scalebar, copyright and north arrow. 
打印任务

PrintTask 控件提供来在web adf 应用程序运行的时候打印的功能。她能够让用户去打印一个地图、任务结果还有图例,比例尺,版权,以及指北针。

 


QueryAttributesTask
The QueryAttributesTask control enables a developer to explicitly(明白的,明确的) define the parameters used to query values in a field.  This control enhances the basic query capability of the SearchAttributesTask.  At runtime, the a QueryAttributesTask query can provide a drop down list of preset choices or a textbox for general text entry.  Each query can also utilize a validator(确认者、验证者) to restrict the values entered.  In addition, multiple queries can be grouped together to produce a single result.  Only feature layers in resources provided by a MapResourceManager can be used.  The results are provided as an ADO.NET DataSet to be displayed in a TaskResults control.  
属性查询任务

QueryAttributesTask 控件能够让开发者明确的定义在一个字段中要进行查询的参数。这个控件增强了SearchAttributesTask基本的查询能力。在运行的时候,QueryAttributesTask查询可以提供一个预设的下拉列表控件或者一个用于普通输入的文本框。每一个输入都能偶利用一个validator(验证控件)来限制用户输入的信息。另外,多个查询能够被组到到一起生成一个单一结果。只有由MapResourceManager提供的资源里面的要素图层才能够被利用。

 


SearchAttributesTask
The SearchAttributesTask control enables a developer to select a set of fields, provided by resources, in which to search for the occurrence of a user provided value.  At runtime, each field is queried for the occurrence of a value provided by the user.  Partial values are permitted.  Only feature layers in resources provided by a MapResourceManager can be used.  The results are provided as an ADO.NET DataSet to be displayed in a TaskResults control.  

属性查询任务

SearchAttributesTask 控件能够让开发者选择有资源提供的一组字段值,在这个里面来搜索当前用户提供的值。在运行的时候,每一个字段都会去搜索由用户提供的一个值。 不完全值也是被允许的。 仅仅在由MapresourceManager控件提供的资源里面的要素图层才能够被利用。查询的结果将会以一个ADO.NET数据集的形式来显示在任务结果控件里面。