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.  

Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.OverviewMap
Using the OverviewMap control
  1. 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. 

    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.

    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:

      
  2. Set OverviewMap properties

    Select the OverviewMap control.  In the Properties page:
    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 Map control added previously.
    3. Set the OverviewMapResource property to a resource added previously to the MapResourceManager. Only one map service can be displayed in the overview map.  
    4. Set the AreaOfInterestLineColor property to a color that will be used to display the Map's area of interest extent within the OverviewMap. 
    5. Additional properties can be configured to change how the map behaves at runtime.  See the Properties section below for more detailed information.
  3. 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.  

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

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