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.
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.
Example 1 - Select Features - Select, reselect, label and sort features.
Example 2 - Feature Symbology - Change the color, size, type of symbols and fonts.
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 4 - Horizontal menu and Zoom To Scale - Customize the horizontal menu bar and Zoom to Scale function.
Example 5 - Map description - Show the description of a map by mousing over its name in the list of available maps.
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 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 8 - Resize map - Resize the map and either preserve the map scale or viewing area.
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.
http://anegada/mapviewer/index.asp
http://anegada/mapviewer/viewer.aspThe 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>
http://anegada/mapviewer/viewer.asp?mapserverurl=http://www.geographynetwork.com&mapservice=ESRI_Landuse&maptitle=ESRI World Landuse
http://anegada/mapviewer/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.
<!-- 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>
<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>
<!-- 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.
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:
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.