News

ArcUser Online


Search ArcUser

mapbackground  

Extending ArcIMS MapServices with ArcXML
by Mark Ho
Esri Educational Services

Editor's note: This article assumes that the reader is familiar with creating a simple ArcIMS Web site using the ArcIMS Manager applications--Author, Administrator, and Designer--and now wants to access additional functionality or modify map display using Arc Extensible Markup Language (ArcXML), the file format ArcIMS uses for communication between its components. In addition to describing in detail how to extend ArcIMS by adding ArcXML elements to the map configuration file, this article includes an overview of the structure and syntax of ArcXML.

Three step-by-step companion tutorials are available. Below are the documents and data you will need to complete these exercises.

Readers unfamiliar with ArcIMS may want to read an article that ran in the October-December 2000 issue of ArcUser magazine, "Creating GIS-Enabled Web Sites Using ArcIMS," that describes the process of making a simple ArcIMS Web site.

When using the ArcIMS applications to create a basic ArcIMS Web site, Author compiles data (e.g., shapefiles, coverages, ArcSDE layers, and image files) chosen by the user into map layers; sets functionality such as scale dependency, feature rendering characteristics, and geocoding; and outputs a map configuration file written in ArcXML. This map configuration file is used by Administrator to start a MapService. The ArcIMS Spatial Server parses requests, assembles and builds requested data, and sends data to clients based on the specifications set out in the map configuration file.

This reference lists all ArcXML elements with a description of the attributes associated with each.

ArcXML, a derivative of XML, a relative of HTML, and a subset of SGML, is a meta-markup language that describes structured data content rather than display information. ArcXML files are text files with an .axl extension that can be edited. ArcXML defines content for MapServices as well as for requests from clients, responses by ArcIMS, and communications between the business logic tier and servers. By manually inserting ArcXML elements and appending element attributes in the map configuration file, additional rendering and labeling options, data subsets, tabular joins, and other capabilities, not available through the ArcIMS Author interface, can be accessed.

ArcXML Structure and Syntax

All ArcXML statements are constructed using elements and attributes organized in a hierarchical structure. As part of this structure, elements are categorized as parent and/or child elements. Child elements are embedded inside parent elements. Most elements have one or more attributes. Attributes are a series of name-value pairs that describe an element. Some ArcXML elements require attributes. If an attribute is not specified for an element in the map configuration file, a default value will be used if one is available for the attribute.

When writing elements and attributes, a strict convention must be followed or ArcIMS may not be able to create the MapService. Elements, which identify the nature of the content being described, must be written in uppercase characters and properly opened and closed with less than (<) and greater than (>) characters in a manner similar to HTML code. Attribute names must be in lowercase characters and the associated values enclosed in double quotes. Only one attribute value can be defined at a time.

ArcXML Programmer's Reference Guide

Usage for each element and attribute can be found in the ArcXML Programmer's Reference Guide. This manual, in PDF format, comes with ArcIMS and is a very useful resource for learning the structure and hierarchy of ArcXML. It lists all ArcXML elements with a description of the attributes associated with each. Required attributes for each element appear in boldface. Attributes are listed with valid defined values or allowed types of values.

For example, the description for the HASHLINESYMBOL element includes valid defined values (e.g., foreground and background for the type attribute) and allowed types of values (e.g., 0,0,0 to 255, 255, 255 for the color attribute). Attribute default values are enclosed in brackets. Element entries contain hyperlinks to any parent or child elements. Required child elements are shown in boldface. Sample code, demonstrating how elements and attributes are used, is also included. The ArcXML Programmer's Reference Guide is also available online at the Support Center.

Adding Elements to the Map Configuration File

Edits to the map configuration file can be made with a simple text editor such as Microsoft WordPad or Microsoft Notepad or by using an XML editor such as XMLSpy from Altova, Inc., or Xeena from IBM alphaWorks. Changes to a map configuration file affecting map display or other properties will not be seen by clients until the MapService is refreshed in Administrator. Refreshing causes the map configuration file to be reread, and the MapService registers the changes.

The map configuration file must be carefully edited to ensure that ArcXML syntax is followed exactly. Errors in the map configuration file will prevent the MapService from refreshing and cause it to be removed from Administrator. The Message Console, accessed by choosing Help > Message Console from the menu of Author or Administrator, displays the error and warning messages generated by ArcIMS. The following sections describe how modifications to various elements can affect the map display using symbolization, labeling, and graphic elements or can be used to query data and join tables.

Continued on page 2

Contact Us | Privacy | Legal | Site Map