Magnifier control


In this topic


About the Magnifier control

The Magnifier control provides a dynamic inset map and lets you zoom in a small area of the map. The magnifier window can be dragged over the map and the magnifier obtains a zoomed in image centered at the middle of the magnifier window. You can change the amount of magnification using the drop-down list in the magnifier window.
The magnifier window extends the FloatingPanel control and automatically floats to allow you to drag it over the map. The magnifier is tied to the Map control via its map property. Its source of data is specified with its MapResourceManager property (the MagnifierMapResource property determines which resource from the MapResourceManager is used in the magnified map image). Only one map resource can be used in the Magnifier control.

Using the control

  1. To add controls on 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, Map control, and Magnifier control onto the Web form.
  2. Add one or more resources to the MapResourceManager and set the Map control's MapResourceManager property to Map1. See the following screen shot that shows the page in Visual Studio:


  3. To set the Magnifier control's properties, select the Magnifier control. Do the following on the Properties window:
    1. Set the Map property to Map1 (map control previously added).
    2. Set the MapResourceManager property to the name of the MapResourceManager created and configured in the previous steps. 
    3. Set the MagnifierMapResource property to a ResourceItem in the MapResourceManager. The ResourceItem cannot be a graphic layer.  
    4. Additional properties can be configured to change how the map behaves at runtime. For example, MagnificationFactor sets the default zoom level of the magnifier window. Properties in the Floating Panel Appearance group determine how the magnifier appears, such as background colors, collapse and expand functionality, Close buttons on the Magnifier window, and so on. See the following screen shot:


Members

The following table shows a list of properties related to the Magnifier control. For more reference information, see the Magnifier control in the Library reference section.
Property name
Type
Description
AreaOfInterestLineColor
bool
Color of the extent rectangle on the Magnifier control.
MagnificationFactor
int
Default magnification factor in the Magnifier window.
MagnifierMapResource
string
Map resource used for magnifying.
Map
string
Map control used to obtain the extent used by the magnifier.
MapResourceManager
string
Map resources used to show the image for the specified magnification.


See Also:

Web ADF controls
Customizing the Web Mapping application




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