-
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.
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:

-
Set MapCopyrightText control properties
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.
-
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.
-
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.
-
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

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. |