zoukankan      html  css  js  c++  java
  • 2010年8月05日_周四_OverviewMap control

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

    //2010年8月5日 周四

    //Developing Web Applications with the Web ADF - Web controls

    // OverviewMap control

    /***********************************************************************************************************/
    The OverviewMap control displays the current extent of a Map control on a map of a larger area. The current extent is drawn as a smaller rectangle within the overview map, which covers a larger area than the main map.  By default, the extent of the overview map does not change as the extent of the buddied map changes and the area of interest box is not interactive.  This is designed to optimize(使优化) performance.  You can change this behavior to enable a smarter OverviewMap experience using the StaticMode property.  
    OverviewMap控件在更大的范围内显示了地图控件当前的显示范围。当前的范围在OverviewMap控件上用一个绘制的小的矩形对话框表示,它包含着比主地图更大的现实范围。默认情况下,OverviewMap地图的现实范围并不随着所关联的地图控件显示范围的改变而改变,矩形框的包含的区域也不能进行交互。这个是被设计为优化OverviewMap控件的表现。你可以通过StaticMode 属性来改变OverviewMap控件的这个行为使之能够变成聪明的OverviewMap控件体验。


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

    Using the OverviewMap control

    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 MapResourceManager, a Map control, and an OverviewMap control onto the Web form. 

    向页面中添加控件

    在VS.NET下打开或者创建一个web站点。在设计视图下打开一个web表格,选择Toolbox,然后展开ArcGIS Web Controls页签。 向页面表格中拖拽一个MapResourceManager,一个地图,和一个鹰眼图控件
    Resize the overview map control to an acceptable size.  Left click and hold over a handle on a side or a corner of the control and drag the control to an acceptable size.   By default, the position of controls added in Visual Studio 2005 at design time is not set.  As a result, the controls are permitted to flow from left to right within a line, and from top to bottom within the page.  See the section about control positioning in the Visual Studio Integration topic for more information.
    重新设置overviewMap控件的大小到一个可以接受的大小。左击然后将光标移动控件一边的把柄或者控件的一个角落,然后拖拽着控件到一个可以接受的大小。默认情况下,在VS2005中的设计视图模式西下添加的控件的位置都是没有进行设置的。 结果,控件就被允许在一条线上面从左到右、从顶部到底部依次浮动着,
    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:

    向MapResourceManager控件中添加一个或者多个资源。 
      

    Set OverviewMap properties

    //设置OverviewMap控件的属性。

    Select the OverviewMap control.  In the Properties page:

    选择OverviewMap控件,打开它的属性窗口。

     

    Set the MapResourceManager property to the name of the MapResourceManager created and configured in the previous steps.

    Set the BuddyControl property to the Map control added previously.

    Set the OverviewMapResource property to a resource added previously to the MapResourceManager. Only one map service can be displayed in the overview map.  

    Set the AreaOfInterestLineColor property to a color that will be used to display the Map's area of interest extent within the OverviewMap. 

    Additional properties can be configured to change how the map behaves at runtime.  See the Properties section below for more detailed information.

    Using the OverviewMap

    The overview map displays the current extent as a rectangle within the overview map area. As the user changes the extent of the buddied map, the area of interest box in the ovew map changes.  Note, the overview map extent remains static and the area of interest box is not interactive.   This optimizes performance but reduces functionality.  
    设置MapResourceManager属性为我们在上一步创建并配置后的MapResourceManager控件的名称。

    设置BuddyControl属性为我们前面添加的地图控件

    设置OverviewMapResource属性为我们在前面向MapResourceManager控件中添加的资源想。只有一个地图资源可以在overviewmap控件中展示

    另外的一些属性可以被用来设置地图控件在运行的时候是如何表现的。更多详细的信息请查看下面的属性部分。

    应用OverviewMap控件信息

    OverviewMap控件以一个矩形区域显示当前显示的范围。当用户改变它绑定的地图的范围的时候,OverviewMap控件中的interest box的面积也随着发生改变。 注意:overview控件的范围仍然保持不变,overviewmap控件的interest box区域是不能和用户交互。


    If the StaticMode  property of the OverviewMap is set to false at design-time, a smarter more interactive overview map is made available at runtime.  As the user zooms or re-centers the main map, the extent on the overview map updates automatically. Also, when the main map pans or zooms, the overview map extent also changes.  The overview map extent changes so that the main map extent remains centered within the overview map, and the proportion of the main map extent rectangle and the overview map extent remains constant. The size ratio between overview and main map extent may be modified by the ExpandPercentage property (see below).  Users may also click and drag on the extent rectangle within the overview map to re-center the main map.

    Members
    在设计的时候如果OverviewMap控件的StaticMode属性设置为false,那么在运行的时候,就可以得到一个更加聪明的可以交互的overview地图。 当用户缩放地图、重新设置地图的中心,OverviewMap 控件的范围就会自动的随着更新。 当然,当主地图平移或者缩放,OverviewMap显示的范围也会随着改变的。当OverviewMap 控件的现实范围改变的后,主地图的显示范围要以OverviewMap 控件的范围的中心为中心,主地图的范围举行框属性和鹰眼图的范围仍然保持不变。 鹰眼图和主地图之间的大小比例可能由ExpandPercentage属性定义。用户也可以在鹰眼图中单击并拖拽着画一个范围矩形,然后重新定义主地图的中心。


    Properties

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

    Property Name

     Type

    Description

    AreaOfInterestLineColor 

    Color

    Color of the extent rectangle for the main map that is displayed on the overview map.

    ExpandPercentage

    double

    Ratio between the size of the overview map and the extent rectangle of the main map shown on the overview map, expressed as a percentage. For example, the default of 500 means that the overview map is 500 percent (5 times) the size of the main-map extent rectangle. In other words, the extent rectangle is 1/5 the height and width of the overview map.

    To disable the ability of the OverviewMap to expand or contract, set the ExpandPercentage property to NaN.  Note, for this to work the default extent of the OverviewMap map resource must include the extent of the Map. 

    Map

    string

    Name of the Map control from which to draw the extent in the overview map.

    MapResourceManager

    string

    Name of the MapResourceManager control with the map service to use for drawing the overview map. Must be the same MapResourceManager used with the buddied Map control.

    OverviewMapResource

    string

    Name of the map resource used by the control to generate a map.

    StaticMode

    boolean

    If set to true (default) the overview map will be rendered as a non-interactive static image.   If false, the overview map extent will change as the buddied map extent changes and you can interact with the area of interest box to change map extent.   Set to true to optimize performance.  Set to false if you need a smarter, interactive overview map.  

    Discussion

  • 相关阅读:
    数据持久化的复习
    iOS: 消息通信中的Notification&KVO
    iOS 证书与签名 解惑详解
    数据持久化 技术比较
    iOS开发拓展篇-XMPP简单介绍
    iOS block并发
    Xcode把应用程序打包成ipa
    谈谈用SQLite和FMDB而不用Core Data
    cannot use the same dataset for report.dataset and page.dataset
    cxGRID中的字段怎么能以0.00的格式显示
  • 原文地址:https://www.cnblogs.com/xingchen/p/1792940.html
Copyright © 2011-2022 走看看