zoukankan      html  css  js  c++  java
  • 2010年8月08日_周日_MapCopyrightText control

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

    //2010年8月8日周日

    // MapCopyrightText control

    // 地图版权文本控件

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


    The MapCopyrightText control is designed to display copyright text on a Map control.  At runtime, the MapCopyrightText control is rendered as text that can be clicked on to display a callout dialog with comprehensive copyright (or other) information.   As a developer, you can define the clickable text and callout content.  All copyright text properties are rendered in a browser, thus any valid HTML content can be used. 

    MapCopyrightText 控件被用来在地图控件上展示版权文本。 在运行状态下,MapCopyrightText显示为一个文本,单击后,显示一个对话框,里面包含综合、全面的地图版权信息。作为一个开发者,你可以定义那个可单击的文本以及弹出的内容。所有的版权文本都是在浏览器里面提供的,因此任何可以获取的HTML内容都可以使用作为版权文本。

    If the Map control contains ArcGIS Server map resources, copyright information (if present) for each layer will be appended to developer defined callout content.   Copyright information can be defined when authoring a map document (mxd) using ArcMap.   In ArcMap, open the layer properties dialog and select the General tab.  Add copyright information in the Credits textbox.  Note, no other data source types return copyright information.   
    如果地图控件包含ArcGISServer地图资源,每一个图层的版权信息都会附加到由开发者定义的弹出内容。版权信息可以在使用ArcMap控件发布地图的时候被定义。 在ArcMap中,打开图层属性对话框,然后选择General 页签。在Credits文本框中输入版权信息。注意:其他类型的数据源不能返回版权信息。


    Assembly: ESRI.ArcGIS.ADF.UI.WebControls.dll
    Class: ESRI.ArcGIS.ADF.UI.WebControls.MapCopyrightText

    Using the MapCopyrightText control

    Add the controls to the page

    Open or create a Web site within Visual Studio.   Open a Web form in design mode, select the Toolbox, and expand the ArcGIS Web Controls tab.  Drag and drop a MapResourceManager, Map, and MapCopyrightText control onto the Web form.
    在VS中打开或者创建一个web 站点。  打开页面的设计视图模式,选择工具箱,然后展开ArcGIS web controls 页签,向页面中添加一个MapResourceManager控件,map控件,mapCopyrighttext控件。


    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 控件中添加一个或者多个地图资源,添加的方法请查看MapResourceManager控件话题中的 add resources 部分。 设置map控件的MapResourceManager属性,属性设置的方法请查看Map control部分。在VS里面,你的页面应该和下面的类似。

    Set MapCopyrightText control properties

    设置MapCopyrightText 控件的属性
    Select the MapCopyrightText control.  In the Properties page:

    Set the Map property to the Map control added earlier.

    Set the Text property to the clickable text you want the MapCopyrightControl to display at runtime.   

    Set the CalloutWindowTitleText property to the text you want to display in the header of the callout dialog when the MapCopyrightText control is clicked at runtime.  This text is always rendered bold. 

    选中MapCopyrightText 控件,打开她的属性页面。

    Set the CopyrightText property to the text you want to display in the body off the callout dialog.  Note, if the Map contains an ArcGIS Server map resource with layers that have copyright information, it will be appended to the text you define for this property.  The map resource item name will also be added before any layer information.   

    Additional properties can be configured to change the scalebar appearance. These include:

    BackColor: The default value is transparent.  If the copyright text is on top of the Map control, define a color that will make it easy to see the clickable copyright text.    

    Font:  Use to define all copyright text properties. 

    设置CopyrightText属性为你要在属性对话框里面展示的文本。 注意:如果map控件包含有包含版权信息的图层的ArcGIS Server服务,那么这些信息将会附加到你定义的CopyrightText 的属性的后面。 地图资源的名称也会被添加到每一个图层信息的前面

    可以配置其他的属性改变比例尺的现实样式,这些属性包括:

    北京颜色:我默认的背景颜色是透明的。如果版权信息在地图控件的顶部,定义一个颜色就可以很容的看到这个可以被单击的版权文本。

    Font:用来定义所有的copyright文本的属性。

    Change the position of the control

    Change the positioning of the control to be absolute, which enables the control to be placed anywhere on the page.  By default, Visual Studio adds controls in flow layout.  Right-click the MapCopyrightText control and select "Style".    In the Style Builder dialog, select the Position option and click the dropdown list under "Position Mode".  Select "Absolutely position" and click OK to exit the dialog.  Select the MapCopyrightText control in design view and start to drag it to another location on the page.  In most cases, you will drag it over a Map control.  Note that when you first attempt to move the contrl, it will immediately display in the upper left corner of the page.  This is default behavior associated with Web control positioning in Visual Studio.  Select the MapCopyrightText control again and drag it to your desired location.
    设置控件的位置属性为absolute(绝对的),这样控件就可以被放置到页面的任何位置。 默认情况下:VS浮动布局的方式添加的控件。 在MapCopyrightText 控件上右键单击鼠标,选择”Style”,在属性创建对话框里面,选择Position 选项,单击“positon mode“下面的下拉列表控件。选择”absolutely position“,然后单击[ok]按钮退出该对话框。在设计模式下选中MapCopyrightText 控件然后开始拖动它页面的另一个位置。在多数情况下,你可以拖放她到地图控件的上面。注意:当你第一次试图移动控件的时候,她将会立即移动到页面左上角的位置。这是在VS里面web 控件位置信息默认的行为。 再一次选中MapCopyrightText控件,将它拖动到你想要的位置。
      

    Runtime use

    At runtime, click on the MapCopyrightText control to display the callout dialog with comprehensive copyright information.  In this example, the MapCopyrightText control was placed in the lower right corner of the Map.   The MapResourceManager used by the Map contained a single ArcGIS Server map resource item "MapResourceItem0" which contains four feature layers.  Two layers have copyright (credits) text defined.   The following property values have been defined on the MapCopyrightText control:

    Map:  Map1

    Text: Copyright ?ESRI 2008

    CalloutWindowTitleText: ESRI Copyright Statement

    CopyrightText: <br/>Copyright ?ESRI 2008 <br/> All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.

    BackColor: White 
    运行状态下,单击MapCopyrightText 控件显示一个调用对话框,里面包含一个综合的全面的版权信息。 在这个例子中,MapCopyrightText 控件被放置在地图控件的右下角的位置。被地图使用的MapResourceManager控件仅仅包含一个单独的ArcGISServer 地图资源,名称为:”MapResourceItem0”,她包含四个要素层。 其中两个图层含有版权信息。下面的属性值已经在MapCopyrightText控件中定义。

    Members

    Properties 

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

    Property Name

     Type

    Description

    Map

    Map

    The Map control associated with copyrighted content (e.g. layers).

    CalloutWindowTitleText

    string

    The text in the header of the callout dialog displayed at runtime when clicking on the MapCopyrightText control. 

    CopyrightText

    string

    The text in the body of the callout dialog displayed at runtime when clicking on the MapCopyrightText control.

    Text

    string

    The clickable text displayed by the MapCopyrightText control at runtime. 

  • 相关阅读:
    Ant 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
    SerfJ REST
    SimpleDateFormat的线程安全问题与解决方案
    蔡勒(Zeller)公式:根据日期推算是星期几
    【转】详解 Spring 3.0 基于 Annotation 的依赖注入实现
    PostgreSQL JSON ARRAY 数据类型
    【转】Tomcat源代码阅读系列
    Spring 数据源
    IBatis-Spring 整合
    24 The Go image package go图片包:图片包的基本原理
  • 原文地址:https://www.cnblogs.com/xingchen/p/1795016.html
Copyright © 2011-2022 走看看