English

How To: Change the ratio of the overview map extent to the main map extent in a Java Viewer

Summary

In ArcIMS Java viewers, the ratio of the overview map extent to the main map extent is known as the zoom factor. If the main map extent is changed by zooming-in or zooming-out, the extent of the overview map will also be changed dynamically to maintain the zoom factor. For example, a zoom factor of four means that the extent of the overview map will change when the map's main scale is less than one-fourth the overview map scale. By increasing the zoom factor, the overview map extent will not change as often for relatively small changes in the scale of the main map.

Procedure

Unfortunately the IMSOverviewMap object in the Java Viewer object model does not have a method to alter the zoom factor for the existing overview map component in a Java Viewer. To define an overview map with a custom zoom factor, add an OVERVIEWMAP element to the viewer configuration file. This will create a new overview map within the main map applet. If using custom Java Viewer, hide the existing overview map frame and use the new overview map. Instructions provided describe how to change the ratio of the overview map extent to the main map extent in a Java Viewer.

  1. Open the viewer configuration file (default.axl) in the ArcIMS/Website/<Website_Name> folder, and add the OVERVIEWMAP element as a child element of CONFIG element. Define a suitable value for the 'zoomfactor' attribute.

    For example:

    Code:
    <CONFIG>
    ....
    <OVERVIEWMAP backgroundcolor="255,255,255" framefillcolor="255,0,0"
    frameoutlinecolor="255,0,0" zoomfactor="100">
    <LAYERDEF name="STATES" />
    </OVERVIEWMAP>
    </CONFIG>


    Note:
    See the ArcXML Programmer's Reference Guide for more detailed information on the OVERVIEWMAP element.

  2. For the custom Java Viewer, hide the existing overview map as follows:

    Open ArcIMS/website/<website_name>/frame.htm file in a text editor and find the following line:

    Code:
    <frameset rows="120,*" id="overview_toc_frameset">

    Change the above line to:

    Code:
    <frameset rows="0,*" id="overview_toc_frameset">

  3. Open ArcIMS/website/<website_name>/default.js file in a text editor and find the following line:

    Code:
    var loadIMSOverview=true;

    Change the above line to:

    Code:
    var loadIMSOverview=false;