Map Viewer About Map Viewer (Third Edition)

Map Viewer (Third Edtion) is a template application that can be customized for developing more complex ASP applications that query and display Image and ArcMap Image services from ArcIMS. Map Viewer (Third Edition) replaces Map Viewer (Second Edition), which was first available in September 2004. Map Viewer is placed in the public domain and is "Freeware". Map Viewer may be freely used and redistributed, and is provided "AS-IS" without warranty of any kind. No technical support is provided. However, you are welcome to email suggestions for the next version of Map Viewer.

Refer to the Change Log for notes on bug fixes and modifications.

Download the code for Map Viewer (Third Edition) from the ArcScripts downloads at www.esri.com.


Overview - Map Viewer is designed to easily view different map services for the same geographic area. For example, connect to a world map of earth quakes, zoom in to the Los Angeles area as shown below, and then use the Add New Map function to change to a map of U.S. Census population.

Add New Map

Features - Map Viewer works off the concept of a Map Viewer "map", which allows the developer to define and create one or more (thematic) map from the same map service. A Map Viewer map is comprised of a map service that is accessed using either some or all of the functions and tools that come with Map Viewer. Each Map Viewer map is defined in the mapviewer.xml file. For example, edit the mapviewer.xml file to specify the URL for the map server, the name of the map service, and the title for the Map Viewer map you want to define. These three paramters (server url, mapservice name, and map title) uniquely identify a Map Viewer map in the mapviewer.xml file. For each map defined in the mapviewer.xml file, you can enable or disable specific Map Viewer functions such as Layers, Legend, Print, Add New Map, Properties, and About Map Viewer. Also, the mapviewer.xml file is used to specify whether certain layers are always visible by default or whether the user can change the visibility or identify specific layers, for example. Specify a default map tool for each Map Viewer map such as zoom in, identify, or select. Different Map Viewer maps can access entirely different sets of layers from the same (massive) map service. In this way, a single map service can form the basis of more than one Map Viewer map and potentially reduce the number of map services to maintain. The mapviewer.xml file can reference more than one ArcIMS server, reference more than one map service per ArcIMS server, and define more than one Map Viewer map per map service. All map services must be in the same coordinate system. Also edit the properties.xml file to specify certain settings that apply to all map viewer maps such as the default map image size and default feature selection color, which the user can subsequently change using Map Viewer's Map Properties function.

  1. Supports ArcIMS Image server and ArcIMS ArcMap server, not ArcIMS Feature server.
  2. Supports W3C DOM compatible browsers.
  3. Customizable horizontal menu bar.
  4. Connect to map services with the Add New Map function.
  5. Draggable pan, rubber-banding zoom, center zoom, and full view functions.
  6. Customizable Zoom To Scale tool.
  7. Multi-layer identify with built-in Select map feature and Pant To map feature links.
  8. Rubber-banding select feature tool.
  9. Auto Select feature function (automatically selects all features viewable on the map).
  10. Data table lists selected feature attributes.
  11. Sort selected features.
  12. Reselect features by clicking on (sorted) attribute values listed in the data table.
  13. Zoom to selected features.
  14. Label selected features with any attribute (ArcIMS Image map services only).
  15. Unselect tool for clearing selected features.
  16. X,Y coordinates of mouse position displayed in the browser's status bar.
  17. Find Feature function (enter search string, zoom to and highlight features).
  18. Map Properties function with user control over map image size and scale bar units.
  19. Print Map function with user control over the placement of the map relative to the legend.
  20. New, <map> element in the mapviewer.xml for using the same map service to define one or more Map Viewer "map". The developer defines a Map Viewer map by enabling specific Map Viewer functions and specifying whether the user can change the visibility of one or more layers, for example. Individual Map Viewer maps can access entirely different sets of layers from the same (massive) map service. In this way, a map service can be the basis for more than one thematic map in Map Viewer.
  21. Developer control over which layers in the map service are listed by the Layers function and whether the user can change the visibility of a layer, include a layer's legend on a map, identify a layer, or select features from a layer.
  22. Developer control over whether layers are visible, identifiable, included in the legend (ArcIMS Image map services only), or active for feature selection by default when the map is first displayed.
  23. Developer control over whether to enable or disable the Layers, Legend, Print, Add New Map, Properties, and About Map Viewer functions.
  24. Developer control over the default map tool (e.g. zoomin, zoomout, pan, identify, select) in use when connecting to the map with the Add New Map function.
  25. Developer control over the default map option (e.g. layers, legend, addnewmap, none) to perform when connecting to the map with the Add New Map function.
  26. Developer control over position and initial size of map image.
  27. User control over whether the (zoom to) scale value displayed by Map Viewer describes the scale of the map when printed on paper or the scale of the map when viewed on the computer screen.
  28. User control over the number of records listed in the data table.
  29. User control over the type, size, pattern, transparency, and color of symbols used to display selected point, line and polygon features (ArcIMS Image map services only).
  30. User control over the font, style, size, and color of the font symbol used to label selected features, (ArcIMS Image map services only).
  31. Special icons are used for the pan, zoom, identify, and select mouse cursors (Internet Explorer only).

Example 1 - Select Features - Select, reselect, label and sort features.

Example 1 - Select and label eatures

Example 2 - Feature Symbology - Change the color, size, type of symbols and fonts.

Example 2 - Change feature selection and labeling symbology

Example 3 - Identify Features - Identify features in one or more layers, and then select (and zoom to) or simply Pan To the map feature afterwards.

Example 3 - Identify features

Example 4 - Horizontal menu and Zoom To Scale - Customize the horizontal menu bar and Zoom to Scale function.

Example 4 - Horizontal menu, Zoom To Scale, and Layers function

Example 5 - Map description - Show the description of a map by mousing over its name in the list of available maps.

Example 5 - Map description

Example 6 - Customize Layer List - Customize the Layers function and control which layers the user is allowed to turn on and off, show in the map legend, identify, and select.

Example 6 - Customized Layers function

Example 7 - Customize the Legend - Restrict the number of layers appearing in the legend. Note that other functions such as Layers, Properties, Search and Print have been disabled in this map.

Example 7 - Customized Legend

Example 8 - Resize map - Resize the map and either preserve the map scale or viewing area.

Example 8 - Resize map

Getting Started - For demonstration purposes, Map Viewer comes pre-configured to access ArcIMS map services available on the Geography Network. There a four ways to connect to these map services.

  1. Open index.asp - Lists all Map Viewer maps included in the mapviewer.xml file. Connect to a map by clicking its name listed on the index.asp page.
    http://anegada/mapviewer/index.asp
    
    index.asp
  2. Open the Default Map Viewer map in viewer.asp.
    http://anegada/mapviewer/viewer.asp
    
    The default Map Viewer map is listed in the mapviewer.xml file. Below is an example of a default Map Viewer map with the required default="true" attribute.
    <!-- mapviewer.xml -->
    <mapviewer edition="3">
     <viewer>
      <position left="0" top="55"/>
      <maptool default="zoomin"/>
      <mapoption default="legend"/>
     </viewer>
     <servers>
      <server url="http://www.geographynetwork.com">
       <mapservices>
        <mapservice name="ESRI_Quake">
         <map title="ESRI World Earth Quakes" default="true">
          <layers enable="true"/>
          <legend enable="true"/>
          <properties enable="true"/>
          <search enable="false"/>
          <print enable="true"/>	
          <addnewmap enable="true"/>
          <aboutmapviewer enable="true"/>
         </map>	
        </mapservice>
       </mapservices>
      </server>
     </servers>
    </mapviewer>
    
    viewer.asp
  3. Open any Map Viewer map in viewer.asp by including the mapserverurl, mapservice, and maptitle arguments in a query string.
    http://anegada/mapviewer/viewer.asp?mapserverurl=http://www.geographynetwork.com&mapservice=ESRI_Landuse&maptitle=ESRI World Landuse
    viewer.asp?mapserverurl=http://www.geographynetwork.com&mapservice=ESRI_Landuse&maptitle=ESRI World Landuse
  4. Open any Map Service in viewer.asp by including the mapserverurl and mapservice arguments in the query string.
    http://anegada/mapviewer/viewer.asp?mapserverurl=http://www.geographynetwork.com&mapservice=ESRI_World
    viewer.asp?mapserverurl=http://www.geographynetwork.com&mapservice=ESRI_World

Technical Overview - Map Viewer is a mapping and data viewing application that operates much like a conventional Web page whereby the browser's Back and Forward buttons navigate through previously generated maps, extents, identify results, feature selections, etc. Unlike certain viewers, Map Viewer is not required to run in a separate (popup) window with the browser's Back and Forward buttons intentionally disabled. In fact, the browser's Back and Forward buttons are an integral part of Map Viewer's interface. Use Back and Forward to revisit previous map pages and pan or zoom the map to a different location or use a different map function than before. Map Viewer does not use HTML Frames. All content is contained in a single HTML page. Dynamic HTML (DHTML) is applied to position and control the visibility of content on the page that changes. For example, DHTML is used to drag the map image with the pan tool or draw a rubber-banding rectangle when using the zoom in, zoom out, or select feature tools. Map Viewer's DHTML supports W3C DOM compatible browsers such as IE 5, 5.5, and 6; Netscape 7 and Mozilla FireFox 1. An HTML form rather than ASP Application and Session variables preserve client state between requests so Map Viewer does not timeout if left idle for 20 minutes, which is the typical life span for an ASP session variable. However, there is a limitation relative to the type of map services used. Only ArcIMS Image and ArcMap Image map services may be used with Map Viewer because the ArcIMS ActiveX Connector can only send requests to the ArcIMS Image Server and not the ArcIMS Feature server. Map Viewer uses the ArcIMSConnector.SendAxlRequest() method to send ArcXML requests directly to the ArcIMS Spatial Server. This is in place of instantiating an ActiveX Map object (session variable) for each client and using methods for the ActiveX Map object such as Map.DoZoom to zoom the map and Map.GetImageAsURL to return the URL address of the resulting image. By directly sending ArcXML requests and parsing ArcXML responses, the developer is better able to take full advantage of ArcIMS because one is relying on the ArcXML protocol to communicate directly with the ArcIMS Spatial Server. The "aims.Map" object is not used at all. Instead, Extensible Stylesheet Transformations (XSLT) convert all ArcXML responses into formats suitable for ASP to write HTML responses. XSLT transforms ArcXML documents into HTML or a delimited list of values. For example, an XSLT stylesheet transforms all ArcXML <IMAGE> responses into a list of information about the image created by ArcIMS. This particular stylesheet, image.xsl, includes XSLT pattern matching rules that retrieve the image URL and envelope information from the ArcXML response. ASP uses this information to create HTML <img> and <input> elements to display the map and store coordinate information on the client. For certain functions, parameters are passed to XSLT stylesheets, which use this information to either parse the ArcXML response and/or include in the HTML response returned to ASP. For example, the 'layerName' parameter is passed to a stylesheet named featureidentify.xsl. This stylesheet formats an HTML table of identify results. The featureidentify.xsl stylesheet receives the layer name as a parameter because the actual name of the layer is not returned in the ArcXML response. Only the Layer id is returned. The featureidentify.xsl places the layer name in the header portion of the HTML table of identify results and combines it with attribute information that it transforms to HTML from the ArcIMS response. In Map Viewer, all user state is maintained on the client in an HTML form, mapForm, which is submitted with each request.


Image Map vs. ArcMap Image map services - Whenever possible, use Image map services rather than ArcMap Image services for best results with Map Viewer. It is eaiser to configure Map Viewer's mapviewer.xml file using Image Map services because the ArcIMS layer ids you need to specify in the mapviewer.xml file are established by you in the map service config file. These layer ids are under your control. On the other hand, it is a little trickier when using ArcMap Image services because ArcIMS assigns numeric-like layer ids based on the order layers are listed in the ArcMap document, beginning with layer id "0" for the last layer drawn, which is at the top of list of layers in ArcMap. Layer id values in an ArcMap Image map service range from "0" to N-1, where N is the number of layers in the ArcMap document (*.mxd). ArcIMS does not respect grouped layers in an ArcMap document. Layers that are grouped in the ArcMap document are treated as individual layers in ArcIMS, each assigned a unique layer id in the ArcMap Image service. Also, with ArcMap Image services, the ability to control whether a layer is included in a legend is not supported so Map Viewer's Layers function isn't fully functional with ArcMap Image services. Map Viewer now programatically disables functions not supported by ArcMap Image servicer such as using AXL to control which layers are included in the map legend, changing the symbology of selected features and even labeling selected features. On the other hand, an advantage of using ArcMap Image services is the ability to use personal geodatabases as data sources and layer rendering (symbology) is arguably easier to do in ArcMap.

Follow these steps for how to discover layer ids for an ArcMap Image map service and use them to specify functionality in the mapviewer.xml file.

  1. In ArcIMS Administrator, start an ArcMap Image map service and name it Base_Map, for example.
  2. Edit the mapviewer.xml file, adding a reference to the map service named Base_Map and assign it a title, My Base Map, for example. You can make this map service the default map service, as shown below.
    <!-- mapviewer.xml -->
    <mapviewer edition="3">
     <viewer>
      <position left="0" top="55"/>
      <maptool default="zoomin"/>
      <mapoption default="legend"/>
     </viewer>
     <servers>
      <server url="http://anegada">
       <mapservices>
        <mapservice name="Base_Map">
         <map title="My Base Map" default="true"/>
        </mapservice>
       </mapservices>
      </server>
     </servers>
    </mapviewer>
    
  3. Open Map Viewer in a browser and display the My Base Map map service. You can zoom to the full extent or anywhere on the map. It doesn't matter where your are viewing the map service or at what scale you are viewing it at.
  4. Now display the HTML source for the (viewer.asp) page you are currently viewing by (in IE for example) going to View->Source and scrolling down to examine the values for the servicelayerid and servicelayername input elements in the form named mapForm, as shown below. As you can see, the Political Boundaries, Rivers, and Streets layers are assigned layer ids, "0", "1", and "2", respectively.
  5. <form id="mapFormId" name="mapForm" action="viewer.asp" method="post">
    <input type="text" size="10" name="styleleft" value="0">
    <input type="text" size="10" name="styletop" value="55">
    <input type="text" size="10" name="mapserverurl" value="http://anegada">
    <input type="text" size="10" name="mapservice" value="Base_Map">
    <input type="text" size="10" name="mapservicetitle" value="My Base Map">
    ...
    <input type="text" size="10" name="servicelayerid" value="2|1|0">
    <input type="text" size="10" name="servicelayername" value="Streets|Rivers|Political Boundaries">
    ...
    </form>
    
  6. Using these layer ids assigned by ArcIMS, continue editing the mapviewer.xml file to indicate how the user can control layers and search for features with Map Viewer's Layers and Find functions, as shown below. Note the addition of the closing </mapservice> element and that the starting <mapservice> element no longer ends with a forward slash (<mapservice/>) as needed above in step 1. This is because the <layers> and <search> elements are child elements of the <mapservice> element and need to be enclosed by the <mapservice> element.
    <!-- mapviewer.xml -->
    <mapviewer edition="3">
     <viewer>
      <position left="0" top="55"/>
      <maptool default="zoomin"/>
      <mapoption default="legend"/>
     </viewer>
     <servers>
      <server url="http://anegada">
       <mapservices>
        <mapservice name="Base_Map">
         <map title="My Base Map" default="true">
          <layers>											
           <layer id="0" candovisible="false" candolegend="true" candoidentify="false" candoselect="false"/>												
           <layer id="1" candovisible="true" candolegend="true" candoidentify="true" candoselect="true"/>										
           <layer id="2" candovisible="true" candolegend="true" candoidentify="true" candoselect="true"/>																
         </layers>
         <search>
          <choice title="Street Name" layerid="2" searchfield="Street_Name"/>
          <choice title="River or Stream" layerid="1" searchfield="River_Name"/>								
         </search>
         <legend enable="true"/>
         <properties enable="true"/>
         <print enable="true"/>	
         <addnewmap enable="true"/>
         <aboutmapviewer enable="true"/>
         </map>
        </mapservice>
       </mapservices>
      </server>
     </servers>
    </mapviewer>
    

Configuration - For demonstration purposes, Map Viewer comes pre-configured to access ArcIMS map services available on the Geography Network. The default configuration will work with an ArcIMS installation that can access ArcIMS map services over the Internet.

  1. Follow the editing instructions in the mapviewer.xml file to access other map services. Edit this file to define Map Viewer maps listed by the Add New Map function. Edit this file to specify the position of Map Viewer on your Web page and either enable or disable the Layers, Legend, Print, Add New Map, Properties, and About Map Viewer functions. Also edit this file to configure the Layers and Find Feature functions. The mapviewer.xml file can reference more than one ArcIMS server, reference more than one map service per ArcIMS server, and define more than one Map Viewer map per map service. All map services must be in the same coordinate system.
  2. Follow the editing instructions in the properties.xml file to set the default Map Properties such as map image size. The default option value for each property is one with its attribute named 'default' equal to a value of true (default="true")
  3. Edit the config_zoomtoscale.js file located in the jscript folder to specify the scales listed by the Zoom To Scale tool.
  4. Edit the config_menubar_map.js and config_menubar_nomap.js files located in the jscript folder to modify the horizontal menu bars.
  5. Edit the config_dateformat.js file located in the jscript folder to specify how to format date fields. For example, choose to display only the year (1901) or the full date (31 Dec 1901).
  6. Edit the mapviewer.css, mapviewer_menubar.css, and mapviewer_zoomtoscale.css files located in the css folder to change the visual presentation of the Web pages.

Mapviewer.xml Guide - Below is a copy of the mapviewer.xml file with a brief description of the type of customization applied to each Map Viewer map. Note the "true" and "false" values applied to the attributes as with <layers enable="true"/> and the the absense of certain elements and or their attributes.

Use the <map> element to define a Map Viewer map. The title attribute is required. Use the desc attribute to include a brief description of the map that pops up when the mouse hovers of the map title when listed by the Add New Map function. Do not include any special characters or apostrophes in this description. Also use the defaultmaptool and defaultmapoption attributes to specify the map tool (zoomin, zoomout, pan, identify, select) and map option (layers, legend, addnewmap, none) to use when the map is firs displayed.

By default, all functions except for Search (Find Feature) are enabled so <layers enable="true"/>, <legend enable="true"/>, <properties enable="true"/>, <print enable="true"/>, <addnewmap enable="true"/>, <aboutmapviewer enable="true"/>, and <search enable="false">. If you do not include these elements, they will revert to these default enable settings.

If <search enable="true">, you need to include the required <option> child elements.

If <layers enable="true">, you can optionally use the candovisible, candolegend, candoidentify, and candoselect attributes to include ("true") or exclude ("false") checkox and radio button controls in the Layer list form. When <layers enable="true"> or when <layers enable="false">, child <layer> isvisibleon, islegendon, isidentifyon and defaultselect attributes can be set to "true" or "false". Note, since Map Viewer only selects features from one layer at at time, only use "defaultselect="true" with one layer. To allow the user to select features from a different layer, use the candoselect="true" attribute setting with each of the layers.

<?xml version="1.0"?>
<mapviewer edition="3">
 <viewer>
  <position left="0" top="55"/>
  <maptool default="zoomin"/>
  <mapoption default="legend"/>
 </viewer>
 <servers>
  <server url="http://www.geographynetwork.com">
   <mapservices>
    <mapservice name="ESRI_Quake">

ESRI World Earth Quakes - A world map of earth quakes that demonstrates how to enable all core Map Viewer functions such as Layers, Legend, Properties, Find, Print, Add New Map, and About Map Viewer. Note enable="true" for all of these elements and the <search> element that enables the Find Feature function also includes required <choice> child elements that define, in this example, 7 ways to search for features in 3 layers: Earthquakes, Country Boundaries 2, and B_Major Cities.

      <map title="ESRI World Earth Quakes" default="true" defaultmaptool="zoomin" defaultmapoption="layers" desc="A world map of...">
      <layers enable="true"/>
      <legend enable="true"/>
      <properties enable="true"/>
      <print enable="true"/>	
      <addnewmap enable="true"/>
      <aboutmapviewer enable="true"/>
      <search enable="true">
       <choice title="Earth Quakes by Magnitude" layerid="Earthquakes" searchfield="ESRI.AA_EQUAKE.MAGNITUDE"/>
       <choice title="Earth Quakes by Depth" layerid="Earthquakes" searchfield="ESRI.AA_EQUAKE.DEPTH"/>
       <choice title="Earth Quakes by Year (yyyy)" layerid="Earthquakes" searchfield="ESRI.AA_EQUAKE.YEAR"/>
       <choice title="Country" layerid="Country Boundaries 2" searchfield="ESRI.BROWSE98_D.CNTRY_NAME"/>
       <choice title="Major Cities" layerid="B_Major Cities" searchfield="ESRI.AWS_CITIES.CITY_NAME"/>
       <choice title="Major Cities by Province or State" layerid="B_Major Cities" searchfield="ESRI.AWS_CITIES.ADMIN_NAME"/>
       <choice title="Major Cities by Country" layerid="B_Major Cities" searchfield="ESRI.AWS_CITIES.CNTRY_NAME"/>
      </search>		
     </map>

ESRI World Earth Quakes (Layers customized) - A world map of earth quakes that illustrates how to customize the Layers function to allow the user to control the visibility, show the legend, identify, and select certain earth quake related layers and not allow the user to control all layers in the map service. Other background layers such as country boundaries are not included in the layer list and can not be turned off by the user, for example. In this map, these background layers are always visible and intentionally excluded from the legend. Note, in this example, the Identify tool is the default map tool.

					
     <map title="ESRI World Earth Quakes (Layers customized)" default="false" defaultmaptool="identify" defaultmapoption="layers" desc="A world map of...">
      <layers enable="true">
       <layer id="Earthquakes" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true" defaultselect="true"/>
       <layer id="Earthquakes 2" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Faults" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="false"/>
       <layer id="V0 Urban Areas" candovisible="true" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="B_National Capital Cities" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="B_Admin Capital Cities 2" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="B_Major Cities" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 4" candovisible="false" candolegend="true" candoidentify="true" candoselect="false" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 3" candovisible="false" candolegend="true" candoidentify="true" candoselect="false" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 2" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 1" candovisible="false" candolegend="true" candoidentify="true" candoselect="false" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Oceans and Seas" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="false" isidentifyon="false"/>									
      </layers>
      <search enable="true">
       <choice title="Earth Quakes by Magnitude" layerid="Earthquakes" searchfield="ESRI.AA_EQUAKE.MAGNITUDE"/>
       <choice title="Earth Quakes by Depth" layerid="Earthquakes" searchfield="ESRI.AA_EQUAKE.DEPTH"/>
       <choice title="Earth Quakes by Year (yyyy)" layerid="Earthquakes" searchfield="ESRI.AA_EQUAKE.YEAR"/>
       <choice title="Country" layerid="Country Boundaries 2" searchfield="ESRI.BROWSE98_D.CNTRY_NAME"/>
       <choice title="Major Cities" layerid="B_Major Cities" searchfield="ESRI.AWS_CITIES.CITY_NAME"/>
       <choice title="Major Cities by Province or State" layerid="B_Major Cities" searchfield="ESRI.AWS_CITIES.ADMIN_NAME"/>
       <choice title="Major Cities by Country" layerid="B_Major Cities" searchfield="ESRI.AWS_CITIES.CNTRY_NAME"/>
      </search>
      <legend enable="true"/>
      <properties enable="true"/>
      <print enable="true"/>	
      <addnewmap enable="true"/>
      <aboutmapviewer enable="true"/>			
     </map>

ESRI World Earth Quakes (Layers not enabled) - A world map of earthquakes without the use of the Layers function. However, this map has been customized so that certain earth quake related layers are, by default, always visible, identifiable, selectable, and included in the map legend. All other background layers are not identifiable, selectable, or included in the map legend. Note that Search (Find Feature) is not enabled.

						
     <map title="ESRI World Earth Quakes (Layers not enabled)" default="false" defaultmaptool="zoomin" defaultmapoption="legend" desc="A world map of...">
      <layers enable="false">
       <layer id="Earthquakes" candovisible="false" candolegend="false" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true" defaultselect="true"/>
       <layer id="Earthquakes 2" candovisible="false" candolegend="false" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="false"/>
       <layer id="Faults" candovisible="false" candolegend="false" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="false"/>
      </layers>
      <search enable="false"/>
      <legend enable="true"/>
      <properties enable="true"/>
      <print enable="true"/>	
      <addnewmap enable="true"/>
      <aboutmapviewer enable="true"/>			
     </map>

ESRI World Earth Quakes (Legend only) - A world map of earthquakes with only the Legend function enabled.

     <map title="ESRI World Earth Quakes (Legend only)" default="false" defaultmaptool="zoomin" defaultmapoption="legend" desc="A world map of...">
      <layers enable="false"/>
      <search enable="false"/>
      <legend enable="true"/>
      <properties enable="false"/>
      <print enable="false"/>	
      <addnewmap enable="false"/>
      <aboutmapviewer enable="false"/>			
     </map>

ESRI World Earth Quakes (limited Legend only) - A world map of earthquakes with only the Legend function enabled. In this map, the legend only includes certain earthquake related layers, two of which can be identified with the Identify tool due to settings made for particular layers. Note that even when the Layers function is not enabled (enable="false") and Map Viewer won't display the Layer list form, the developer still has control over the isvisibleon, islegendon, isidentifyon and defaultselect attributes for any layer. When <layers enable="false">, child <layer> isvisibleon, islegendon, isidentifyon and defaultselect attributes can be set to "true" or "false".

			
     <map title="ESRI World Earth Quakes (limited Legend only)" default="false" defaultmaptool="zoomin" defaultmapoption="legend" desc="A world map of...">
      <layers enable="false">
       <layer id="Earthquakes" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Earthquakes 2" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Faults" isvisibleon="true" islegendon="true" isidentifyon="false"/>
       <layer id="V0 Urban Areas" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="B_National Capital Cities" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="B_Admin Capital Cities 2" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="B_Major Cities" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 4" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 3" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 2" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Country Boundaries 1" isvisibleon="true" islegendon="false" isidentifyon="false"/>
       <layer id="Oceans and Seas" isvisibleon="true" islegendon="false" isidentifyon="false"/>									
      </layers>
      <search enable="false"/>
      <legend enable="true"/>
      <properties enable="false"/>
      <print enable="false"/>	
      <addnewmap enable="false"/>
      <aboutmapviewer enable="false"/>
     </map>			
    </mapservice>

ESRI World Landuse - A world map of landuse with all Map Viewer functions enabled. The Layers and Search (Find Feature) functions have been customized. Other functions like Legend and Print are enabled by default, even without including their <legend enable="true"/> and <print enable="true"/> elements.

    <mapservice name="ESRI_Landuse">
     <map title="ESRI World Landuse" default="false" desc="A world map of...">
      <layers enable="true">
       <layer id="Capital Cities" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Major Cities 1" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Land Use 1" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Land Use 2" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Country Boundaries" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>										
      </layers>									
      <search enable="true">
       <choice title="Country" layerid="Country Boundaries" searchfield="ESRI.BROWSE98_D.CNTRY_NAME"/>
       <choice title="Major Cities" layerid="Major Cities 1" searchfield="ESRI.AA_CITY.NAME"/>
      </search>
     </map>				
    </mapservice>

US Atlas of States and Counties - A US map of States and counties with all Map Viewer functions enabled. The Layers and Search (Find Feature) functions have been customized.

    <mapservice name="Atlas_States_Counties">
     <map title="US Atlas of States and Counties" default="false" desc="A US map of...">
      <layers enable="true">
       <layer id="Counties" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="States020_2" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="States020_1" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="States150" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="States075" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="Non-U.S. Land" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>										
      </layers>
      <search enable="true">
       <choice title="Counties" layerid="Counties" searchfield="ATLAS.ATLAS_COUNTYP020.COUNTY"/>
       <choice title="Counties by State (AZ,CA,FL,etc)" layerid="Counties" searchfield="ATLAS.ATLAS_COUNTYP020.STATE"/>
      </search>
     </map>								
    </mapservice>

US Census Population - A US Census population map with all Map Viewer functions enabled. The Layers and Search (Find Feature) functions have been customized.

    <mapservice name="Census_Population">
     <map  title="US Census Population" default="false">
      <layers enable="true">
       <layer id="TP_tract" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="TP_place" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="TP_group" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="TP_block" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="County 1" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="County 2" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="State 1" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="State 2" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>																			
      </layers>			
      <search enable="true">
       <choice title="Population by State" layerid="State 2" searchfield="MISC.USGS_STATE_CNTY_D.STATE"/>
       <choice title="Population by County" layerid="County 2" searchfield="TGR.TGR_COUNTY.NAME_"/>
       <choice title="County Population by State" layerid="County 2" searchfield="TGR.TGR_COUNTY.STATE"/>
       <choice title="Tract Population by County" layerid="TP_tract" searchfield="TGR.TGR_TRACT.COUNTYNAME"/>
       <choice title="Population by Place" layerid="TP_place" searchfield="TGR.TGR_PLACES.NAME"/>
      </search>
     </map>			
    </mapservice>

US Census Tiger 2000 - A US Street map with all Map Viewer functions except the Search (Find Feature) function enabled. Note the absense of the desc, defaultmaptool, and defaultmapoption attributes. This map does not include a map description, and the initial maptool and mapoption are based on the default settings for <maptool> and <mapoption> elements in the <viewer> element above.

    <mapservice name="Census_TIGER2000">
     <map title="US Census Tiger 2000" default="false"/>
    </mapservice>

US FEMA Floodzones - A US map of flood zones from the Federal Emergency Management Agency (FEMA) with all Map Viewer functions enabled. The Layers and Search (Find Feature) functions have been customized.

    <mapservice name="FEMA_Flood">
     <map title="US FEMA Floodzones" default="false" desc="A US map of flood zones from the Federal Emergency Management Agency (FEMA) with all Map Viewer functions enabled.">
      <layers enable="true">
       <layer id="Flood Hazard Areas" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>																								
       <layer id="FEMA_Cov 4" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="FEMA_Cov 3" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="FEMA_Cov 2" candovisible="false" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="FEMA_Cov 1" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="FEMA_Cov 0" candovisible="false" candolegend="true" candoidentify="false" candoselect="false" isvisibleon="true" islegendon="true" isidentifyon="true"/>
       <layer id="GEO.CONUS_RELIEF.IMAGE_2" candovisible="true" candolegend="true" candoidentify="true" candoselect="true" isvisibleon="true" islegendon="true" isidentifyon="true"/>					
      </layers>				
      <search enable="true">
       <choice title="County" layerid="FEMA_Cov 2" searchfield="MISC.USGS_COUNTY_D.NAME_"/>
       <choice title="State" layerid="FEMA_Cov 2" searchfield="MISC.USGS_COUNTY_D.STATE"/>
      </search>
     </map>			
    </mapservice>
   </mapservices>
  </server>
 </servers>
</mapviewer>

System Requirements - Map Viewer requires either ArcIMS 4.01, ArcIMS 9.0 or ArcIMS 9.1 with the ActiveX Connector installed, which means you can only use Map Viewer with ArcIMS installed on a PC-Intel-Windows platform such as Windows 2000 Server, Windows Server 2003 or Windows XP Professional (for development purposes). Linux and Unix are not supported because ArcIMS’s ActiveX connector will not install on these operating systems. Be sure to choose to install the ActiveX connector when installing ArcIMS. By default, the ActiveX connector isn't installed; you need to choose to install it by checking it on during the ArcIMS installation process. Map Viewer was developed and tested in the following ArcIMS Server environments:

  1. Windows XP Pro, ArcIMS 4.0.1, ActiveX Connector, ServletExec 4.1.1, Java SDK 1.4.0.
  2. Windows XP Pro, ArcIMS 9.0, ActiveX Connector, ServletExec 5.0, Java SDK 1.4.2
  3. Windows XP Pro, ArcIMS 9.1, ActiveX Connector, ServletExec 5.0, Java SDK 1.4.2

Browser Support - Supports W3C DOM compatible browsers such as IE 5, 5.5, and 6; Netscape 7 and Mozilla FireFox 1. No support for IE 4 and Netscape Navigator 4. Map Viewer (Third Edition) was tested in Internet Explorer 6, Netscape 7.2 and Mozilla Firefox 1.0.


Acknowledgements - Special thanks goes to Keith Gerhartz for his thoughtful suggestions and Javascript contributions that greatly improved the performance of the Layers function.

Map Viewer's horizontal menu bar uses jsDOMenuBar Version 1.1.1, Copyright (C) 2004 - 2005 Toh Zhiqiang Released on 12 February 2005. The jsDOMenuBar is distributed under the terms of the GNU GPL license. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by theFree Software Foundation; either version 2 of the License, or (at your option) any later version. You can download the jsDOMenuBar at www.tohzhiqiang.per.sg/projects/jsdomenubar/ and refer to license.txt and readme.txt included in the download for more information.

The icons used for the pan, zoom, and identify mouse cursors were obtained from the Simple Map Viewer Application downloaded from ArcObjects Online.

Techniques for controlling page layout, style and design are from "Cascading Style Sheets: The Definitive Guide" 2nd Edition by Eric A. Meyer, published by O'Reilly & Associates, Inc. (www.oreilly.com) ISBN 0-596-00525-31.

Techniques for cross-platform object positioning are from "Dynamic HTML: The Definitive Reference" 2nd Edition by Danny Goodman, published by O'Reilly & Associates, Inc. (www.oreilly.com) ISBN 0-596-00316-1.

An understanding of Extensible Stylesheet Transformations (XSLT) was obtained by reading "Learning XSLT: A Hands-On Introduction to XSLT and XPath" by Michael Fitzgerald, published by O'Reilly & Associates, Inc. (www.oreilly.com) ISBN 0-596-00327-7.

Techniques for using Extensible Stylesheet Transformations (XSLT) to convert XML to HTML are from "XSLT: Mastering XML Transformations" by Doug Tidwell, published by O'Reilly & Associates, Inc. (www.oreilly.com) ISBN 0-596-00053-7.


Feedback - Email suggestions for the next version of Map Viewer.

Map Viewer Web sites - Email the URL of your Map Viewer implementation so that it can be shared with those who want to see examples of Map Viewer on the Internet. Thanks.