OverviewMap control


In this topic


About the 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 on the overview map and 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 (optimizes performance). You can change the behavior to enable a more efficient OverviewMap by using the StaticMode property.

Using the control

  1. To add 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, a Map control, and an OverviewMap control onto the Web form. 
  2. To resize the OverviewMap control to an acceptable size, click and hold over a handle on a side or corner of the control, then drag the control. By default, the position of controls added in Visual Studio at design-time is not set. As a result, controls can flow left-to-right on a line and top-to-bottom on the page. For more information, see the steps under the Characteristics of developing applications section in the Visual Studio 2005 and 2008 integration topic.
  3. Add one or more resources to the MapResourceManager. Set the Map control's MapResourceManager property to Map1. See the following screen shot that shows the page in Visual Studio:

  1. Select the OverviewMap control and do the following on the Properties window:
    1. Set the MapResourceManager property to the name of the MapResourceManager created and configured in the previous steps.
    2. Set the BuddyControl property to the previously added Map control.
    3. Set the OverviewMapResource property to the previously added resource on the MapResourceManager. Only one map service can display on the overview map.  
    4. Set the AreaOfInterestLineColor property to a color used to display the map's area of interest extent on the OverviewMap. 
    5. Configure additional properties to change how the map behaves at runtime. For more information, see the Members section in this topic. See the following screen shot that shows the Properties window: 


  2. The overview map shows the current extent as a rectangle on the overview map area. When the extent of the buddied map is changed, the area of interest box on the overview map changes. The overview map extent remains static and the area of interest box is not interactive (optimizes performance but reduces functionality). 

    If the StaticMode property of the OverviewMap is set to false at design-time, a more efficient, interactive overview map is available at runtime. When the main map is zoomed to or re-centered, the overview map extent updates automatically. When the main map is panned or zoomed, the overview map extent also changes. The overview map extent changes allowing the main map extent to remain centered on the overview map, and the proportion of the main map extent's rectangle and the overview map extent remains constant.

    The size ratio between the overview and main map extent can be modified by the ExpandPercentage property. You can also click, then drag the extent rectangle on the overview map to re-center the main map.

Members

The following table shows a list of properties related to the OverviewMap control. For more reference information, see the OverviewMap control in the library reference section.
Property name
Type
Description
AreaOfInterestLineColor
color
Color of the main map's extent rectangle shown 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 indicates the overview map is 500 percent (five times) the size of the main map's extent rectangle; that is, 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 to not a number (NaN). To work, the default extent of the OverviewMap's map resource must include the extent of the map.
Map
string
Name of the Map control from which to draw the extent on the overview map.
MapResourceManager
string
Name of the MapResourceManager control with the map service used to draw 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 renders as a non-interactive static image. If set to false, the overview map extent changes as the buddied map extent changes and you can interact with the area of interest box to change the map extent. Set to true to optimize performance. Set to false for a more efficient, interactive overview map.


See Also:

Web ADF controls
Customizing the Web Mapping application
Visual Studio 2005 and 2008 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