Developing Web Applications with the Web ADF - Web controls  

Navigation control



The navigation control is associated with a single map control.  It provides common map navigation functions, such as pan and zoom, in a single control.   In addition, the visual representation of the control can be customized.  It can be rendered as an image or character glyph within a true-type font. 

Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.Navigation

Using the Navigation 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, Map, and Navigation control on the Web form.  You should see the following in Visual Studio:

      

    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.

    Set up the Map control.  See the Set Map properties section in the Map control topic for additional information.
  2. Set Navigation control properties

    Select the Navigation control.  In the Properties page:
    1. Set the BuddyControl property to the name of the Map created in the previous step. 


    2. The DisplayCharacter property defines a font and the character index of a glyph to use for the Navigation control.  To select another font or glyph, click the down arrow in the property value.   The following dialog allows a visual search for other fonts and glyphs available.    

    3. To set the Navigation control to render as an image, set the DisplayImageUrl property to a valid URL.   The image URL must be available from the perspective of the client browser at runtime.  The URL can be relative to the Web application.
  3. 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 2005 adds controls in flow layout.  Right-click the Navigation 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 Navigation control in design view and start to drag it to another location on the page.  Note that it will immediately display in the upper left corner of the page.  This is default behavior associated with Web control positioning in Visual Studio 2005.  Select the Navigation control again and drag it into the lower right corner of the Map control.


        
  4. Navigate a Map at runtime using the Navigation control

    At runtime, move the mouse cursor over the Navigation control.  Press and hold the left mouse button down on direction in which you would like the map to pan.  For example, to pan to the west, position the cursor over the "W" or the left side of the control and hold the mouse button down.  The map will pan in the direction indicated.  While holding the mouse button down, move the mouse cursor around the Navigation control.  Note that the pan direction will change with respect to cursor position on the control.   

                                        
     

Members

Properties

  The following table provides a list of properties of interest.  For complete reference information, see the Navigation control in the library reference section.

Property Name  Type Description
DisplayCharacter DisplayCharacter The character to display. If the DisplayImageUrl property is set , then this property is ignored.
DisplayImageUrl string The URL of the image to display. This property overrides the DisplayCharacter property.
ImageFormat WebImageFormat Format of the generated image when using a font character as a north arrow.
Map string The Map Control used to determine the rotation of this Navigation with.
Size int Size of the north arrow in points (1/72 inch) when using a font character as a north arrow.
Speed int The speed that the map will pan when navigating with the Navigation Control