ArcXML Programmer's Reference Guide for ArcIMS 9.0  

Using Map and Viewer Configuration Files


Introduction

Configuration files are used to define a map. There are four types of configuration files: The following sections cover configuration files in detail. The first section discusses map configuration files for Image and Feature Services, the next section covers viewer configuration files, and the third section reviews default.axl. A final section provides a summary review of the similarities and differences among the configuration file types.

Note: Metadata configuration files and map configuration files created using ArcMap are not discussed in this document. Metadata configuration files are covered in Creating and Using Metadata Services. Information on creating ArcMap documents can be found in Using ArcMap.

Map Configuration Files

Map configuration files are used as input to ArcIMS services. All information in a map configuration file provides a default set of instructions for map properties and rendering. Requests can override information in the service properties, but if the request does not include any special instructions, then the default service properties prevail. The diagram below shows the flow for creating an ArcIMS service using a map configuration file as input.

Map configuration file flow

Framework of a map configuration file

This next section focuses on the framework of ArcXML map configuration files used as input to Image and Feature MapServices. An ArcXML map configuration file can be divided into several sections. The following example shows the basic framework.

Framework of a map configuration file
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>...</ENVIRONMENT>
    <MAP>
      <PROPERTIES>...</PROPERTIES>
      <WORKSPACES>...</WORKSPACES>
      <LAYER>...</LAYER>
    </MAP>
  </CONFIG>
</ARCXML>

A map configuration file includes:

ARCXML and the prolog

The first line of an ArcXML statement is the prolog. All ArcXML 1.1 statements are required to use a standard prolog that includes the XML version and encoding. The XML version is 1.0. Encoding in ArcXML 1.1 is UTF-8.

After the prolog, all ArcXML statements begin and end with ARCXML. This element is required, and the version number is 1.1.

Prolog and ARCXML
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">

...
</ARCXML>

CONFIG, ENVIRONMENT, and MAP

A map configuration file distinguishes itself from a REQUEST or RESPONSE by the CONFIG element. For more information on the relationship between map configuration files, requests, and responses, see Introduction to ArcXML.

The only CONFIG child elements in a map configuration file are ENVIRONMENT and MAP.

CONFIG, ENVIRONMENT, and MAP
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>...</ENVIRONMENT>
    <MAP>...</MAP>
  </CONFIG>
</ARCXML>

ENVIRONMENT is used to set up information about the environment used in the ArcIMS service. Once the environment is established, clients in one locale can access a service created in another locale.

ENVIRONMENT and its child elements
<ENVIRONMENT>
  <LOCALE language="en" country="US" />
  <UIFONT name="Arial" color="0,0,0" size="12" style="regular" />
  <SEPARATORS cs=" " ts=";"/>
  <SCREEN dpi="96"/>
</ENVIRONMENT>

Child elements of ENVIRONMENT include the following: The element MAP contains all the instructions for generating a map.

MAP and its child elements
<MAP>
  <PROPERTIES>...</PROPERTIES>
  <WORKSPACES>...</WORKSPACES>
  <LAYER>...</LAYER>
</MAP>

The PROPERTIES, WORKSPACES, and LAYER elements are discussed in detail in the next sections.

MAP: PROPERTIES

PROPERTIES provides the framework for defining properties about an ArcIMS service. The child element ENVELOPE is required but all other child elements are optional. The child elements shown in the following example are used in both Image and Feature Services.

PROPERTIES and its child elements for both Feature and Image Services
<PROPERTIES>
  <ENVELOPE minx="-105.594842" miny="-49.955227" maxx="75.672764" maxy="83.596039" name="Initial_Extent" />
  <MAPUNITS units="decimal_degrees" />
  <FEATURECOORDSYS id="54008" />
  <FILTERCOORDSYS id="54008" />
</PROPERTIES>

The following child elements are valid only with Image Services and are more commonly used in requests than in a map configuration file:

PROPERTIES and its child elements valid only with Image Services (in bold)
<PROPERTIES>
  <ENVELOPE minx="-105.594842" miny="-49.955227" maxx="75.672764" maxy="83.596039" name="Initial_Extent" />
  <MAPUNITS units="decimal_degrees" />
  <FEATURECOORDSYS id="54008" />
  <FILTERCOORDSYS id="54008" />
  <BACKGROUND... />
  <LEGEND... />
  <OUTPUT... />
</PROPERTIES>

MAP: WORKSPACES

WORKSPACES specifies the location of all the data used in the map configuration file. All data locations must be visible to any computer hosting ArcIMS services. Each workspace must have a unique reference name. Valid WORKSPACES in map configuration files are: Valid WORKSPACES in a map configuration file:
<WORKSPACES>
  <SHAPEWORKSPACE name="shp_ws-0" directory="c:\ESRIDATA"/>
  <IMAGEWORKSPACE name="jai_ws-1" directory="c:\ESRIDATA"/>
  <SDEWORKSPACE name="sde_ws-2" server="myserver" instance="port:5150" database="" user="washoe" encrypted="true" password="LXEMUR" />
</WORKSPACES>

MAP: LAYER

LAYER is the parent element for defining a map layer. Attributes cannot be overridden by a request. The following attributes are required: The following attributes are optional: Sample LAYER with attributes:
<LAYER type="featureclass" name="CITIES" minscale="1:24000" maxscale="1:100000" visible="true" id="2">
...
</LAYER>

MAP: LAYER child elements

A LAYER used in a map configuration file has several child elements. The purpose of these elements is to identify the data source and to render the data.

LAYER with child elements
<LAYER type="featureclass" name="CITIES" minscale="1:24000" maxscale="1:100000" visible="true" id="2">
  <DATASET name="Cities_Robinson" type="polygon" workspace="shp_ws-0" />
  <DENSIFY tolerance="10000" />
  <COORDSYS id="54030" />
  <SPATIALQUERY where="population > 1000000" />
  <SIMPLERENDERER>
    <SIMPLEPOLYGONSYMBOL filltransparency="1.0" fillcolor="27,127,127" />
  </SIMPLERENDERER>
</LAYER>

The types of child elements can be divided into several groups: DATASET, projection elements, query elements, EXTENSION elements, and renderer and symbol elements.