In this topic
Local (DCOM) connections are only supported for ArcGIS for Server versions prior to 10.1.
About the Map control
The Map control displays geographic data from one or more resources provided by different data source types. The Map control must be associated with a MapResourceManager control to define the resources shown on the map. The MapResourceManager also sets the transparency settings for the resources, each of which is treated as a separate layer on the map.
The Map control blends resources together and renders a single image. Advanced map tool functionality enables continuous panning and zooming capabilities without reloading the Web page that contains the map (that is, a full postback is not required). In addition, game style navigation provides scroll wheel zooming and keyboard navigation options at runtime.
Other Web Application Developer Framework (ADF) controls buddy with the Map control to enhance the user experience with the map, such as the Toolbar control, Navigation control, MapTips control, and ZoomLevel control.
For more information about the Map control, see Working with the Map control.
Using the control
Do the following to use the control:
- To use the Map control, add supporting controls to the page. Open or create a Web site in Visual Studio. Open a Web form in design mode, select the Toolbox panel, and expand the ArcGIS Web Controls tab. Drag and drop a MapResourceManager and a Map control onto the Web form. Add one or more resources to the MapResourceManager. See the following screen shot that shows the controls on the page in Visual Studio:
- To set Map properties, select the Map control. Do the following on the Properties window:
- Set the MapResourceManager property to the name of the previously created and configured MapResourceManager.
- Set the PrimaryMapResource property to a ResourceItem in the MapResourceManager. The ResourceItem cannot be a graphics layer. For more information, see Define primary map resource.
- Resize the Map control to an acceptable size. Click and hold over a handle on a side or corner of the control, then drag the control to an acceptable size. By default, the position of controls added in Visual Studio at design time is not set. As a result, controls are permitted to flow left to right on a line and top to bottom on the page. For more information about control positioning, see Characteristics of developing applications.
See the following screen shot that shows the Properties window in Visual Studio:
Additional properties can be configured to change how the map behaves at runtime. For additional properties information, see the Members section in this topic.
- The Map control is usually the central control for any Web-based geographic information system (GIS) application. As a result, it is often buddied with other supplementary controls; however, the Map control does not specifically define a buddy control (other controls included with the Web ADF buddy to the Map control). This includes the Toc, MapTips, OverviewMap, ZoomLevel, Navigation, Toolbar, and task controls (all are used to enhance Map control interaction).
Members
The following table shows a list of properties related to the Map control. For more information, see the Map control in the Library Reference section.
Property name
|
Type
|
Description
|
EnableContinuousCallback
|
bool
|
Whether images are fetched continuously during panning of the map or only when panning is complete.
|
EnableTileCaching
|
bool
|
Whether tiles that have been retrieved during of the map are cached until the scale changes.
|
EnableZoomAnimation
|
bool
|
Whether animation occurs for fixed zoom operations.
|
ImageBlendingMode
|
ImageBlendingMode
|
Whether images are blended on the Web server or in the Web browser.
|
ImageFormat
|
ImageFormat
|
Format of the output image.
|
InitialExtent
|
InitialExtent
|
Initial extent at which the map first renders.
|
MapResourceManager
|
string
|
ID of the MapResourceManager whose resources show on the map.
|
PreferredTileHeight
|
int
|
Preferred tile height to request if resources are not bound to a tile caching scheme.
|
PreferredTileWidth
|
int
|
Preferred tile width to request if resources are not bound to a tile caching scheme.
|
PrimaryMapResource
|
string
|
Primary map resource whose properties other MapResources adhere to for blending to occur. This property cannot be a graphics layer. If the property is empty, the last resource item is used.
|
Rotation
|
double
|
Rotation of the map in degrees. If the value is not a number (NaN), the primary map resource's rotation is used; otherwise, the rotation is applied. A 0 value is a valid rotation and can be used to change the default rotation of the primary map resource. When rotation is applied, all resources on the map supports map rotation.
|
ScrollWheelZoom
|
bool
|
Whether the map can be zoomed using the mouse scroll wheel.
|
ToolItems
|
MapToolItemCollection
|
Map tool item collection where tools can be stored for the map.
|
UseMimeData
|
bool
|
Set to true to store output images in session and stream them to the client or store them on the file system.
|
VirtualDirectory
|
string
|
Path to the virtual directory in which images can be written, for example, ~/output/.
|
Events
The following table shows a list of events related to the Map control. For more information, see the Map control in the Library Reference section.
Event type
|
Description
|
Circle
|
Raised when the control processes a tool associated with the Circle Client Tool action.
|
DragImage
|
Raised when the control processes a tool associated with the DragImage Client Tool action.
|
DragRectangle
|
Raised when the control processes a tool associated with the DragRectangle Client Tool action.
|
ExtentChanged
|
Occurs when the extent of the control changes.
|
Line
|
Raised when the control processes a tool associated with the Line Client Tool action.
|
MapClick
|
Occurs when the control is clicked.
|
Oval
|
Raised when the control processes a tool associated with the Oval Client Tool action.
|
Point
|
Raised when the control processes a tool associated with the Point Client Tool action.
|
Polygon
|
Raised when the control processes a tool associated with the Polygon Client Tool action.
|
Polyline
|
Raised when the control processes a tool associated with the Polyline Client Tool action.
|
Refreshed
|
Occurs when the Map is fully refreshed. Does not occur if only one resource is refreshed with browser blending.
|
Resized
|
Occurs when the Map control is resized.
|
ResourceRefreshed
|
Occurs when a map resource is refreshed. Can be used to detect single resource refreshing with browser blending.
|
RotationAngleChanged
|
Occurs when the rotation of the Map changes.
|
ScaleChanged
|
Occurs when the scale of the Map changes.
|
TilingSchemeInitialized
|
Occurs when the Map has initialized the TilingScheme.
|
See Also:
Working with the Map controlWeb controls
Visual Studio 2008/2010 integration
To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
ESRI.ArcGIS.ADF.Web.UI.WebControls.dll