EXTENSION  Examples

Used in:  CONFIG   RESPONSE  
Servers:  Image   Query   Feature   Extract   Geocode  
Parent elements:  LAYER   LAYERINFO  

<EXTENSION Attribute Description Table

     type ="Geocode | StoredQuery | Extract"
>

     <EXTRACTPARAMS... />  [Or]
     <GCSTYLE... />  [Or]
     (m) <STOREDQUERIES... />  [Or]

</EXTENSION >
Bold: Attribute or child element is required.
(m):  Child element can be used multiple times.


Description:


Restrictions:


Notes:


Attribute Descriptions for EXTENSION:

Attribute Usage Back to Top
type Extension type: Geocode, StoredQuery, or Extract.
 

Examples for EXTENSION:

Example 1: Describes a layer with two extensions: one for geocoding and another for stored queries. Back to Top
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>
      <LOCALE country="US" language="en" variant="" />
      <UIFONT color="0,0,0" name="Arial" size="12" style="regular" />
      <SCREEN dpi="96" />
    </ENVIRONMENT>
    <MAP>
      <PROPERTIES>
       <ENVELOPE minx="-71.077092" miny="42.357962" maxx="-71.034511" maxy="42.385263" name="Initial_Extent" />
       <MAPUNITS units="decimal_degrees" />
      <FILTERCOORDSYS id="4326" />
      <FEATURECOORDSYS id="4326"/>
      </PROPERTIES>
      <WORKSPACES>
       <SHAPEWORKSPACE name="shp_ws-64" directory="<path to data>" />
      </WORKSPACES>
      <LAYER type="featureclass" name="Streets" visible="true" id="4">
       <DATASET name="bosstreets" type="line" workspace="shp_ws-64" />
       <SIMPLERENDERER>
         <SIMPLELINESYMBOL type="solid" width="2" color="255,0,0" />
       </SIMPLERENDERER>
       <EXTENSION type="Geocode">
         <GCSTYLE name="USAddressZ">
           <GCFIELD id="FromLeft" name="L_F_ADD" />
           <GCFIELD id="FromRight" name="R_F_ADD" />
           <GCFIELD id="ToLeft" name="L_T_ADD" />
           <GCFIELD id="ToRight" name="R_T_ADD" />
           <GCFIELD id="PreDir" name="PREFIX" />
           <GCFIELD id="PreType" name="PRE_TYPE" />
           <GCFIELD id="StreetName" name="NAME" />
           <GCFIELD id="StreetType" name="TYPE" />
           <GCFIELD id="SufDir" name="SUFFIX" />
           <GCFIELD id="LeftZone" name="ZIPL" />
           <GCFIELD id="RightZone" name="ZIPR" />
         </GCSTYLE>
       </EXTENSION>
       <EXTENSION type="StoredQuery">
         <STOREDQUERIES>
           <STOREDQUERY name="Streets">
             <QUERY where=" NAME  = &apos;[%var%]&apos;" subfields="#SHAPE# L_F_ADD L_T_ADD R_F_ADD R_T_ADD PREFIX PRE_TYPE NAME TYPE SUFFIX ZIPL ZIPR CITYL CITYR STATE_ABBR CFCC ROAD_TYPE" />
             <SQVAR position="0" name="[%var%]">
              <FIELD name="NAME" precision="0" type="12" size="32" />
             </SQVAR>
           </STOREDQUERY>
         </STOREDQUERIES>
       </EXTENSION>
      </LAYER>
    </MAP>
  </CONFIG>
</ARCXML>

Example 2: When using an EXACTPARAMS extension. Back to Top
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>
      <LOCALE country="US" language="en" variant="" />
      <UIFONT color="0,0,0" name="Arial" size="12" style="regular" />
      <SCREEN dpi="96" />
    </ENVIRONMENT>
    <MAP dynamic="true">
      <PROPERTIES>
        <ENVELOPE minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0" name="Initial_Extent" />
        <MAPUNITS units="decimal_degrees" />
        <FILTERCOORDSYS id="4326" />
        <FEATURECOORDSYS id="4326"/>
      </PROPERTIES>
      <WORKSPACES>
        <SHAPEWORKSPACE name="shp_ws-2" directory="<path to USA ESRIDATA>" />
      </WORKSPACES>
      <LAYER type="featureclass" name="STATES" visible="true" id="States">
        <DATASET name="STATES" type="polygon" workspace="shp_ws-2" />
        <EXTENSION type="Extract" >
          <EXTRACTPARAMS clip="true" />
        </EXTENSION>
        <SIMPLERENDERER>
          <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="255,0,0" />
        </SIMPLERENDERER>
      </LAYER>
      <LAYER type="featureclass" name="CITIES" visible="true" id="35">
        <DATASET name="CITIES" type="point" workspace="shp_ws-2" />
        <SIMPLERENDERER>
          <SIMPLEMARKERSYMBOL color="102,0,102" width="8.0" />
        </SIMPLERENDERER>
        <SPATIALQUERY where="POP1990 &gt; 100000" subfields="CITY_NAME STATE_NAME POP1990 MALES FEMALES"  />
        <EXTENSION type="Extract" >
        <EXTRACTPARAMS clip="true" >
          <OUTPUTFILE file="us_cities" >
            <OUTPUTFIELD name="CITY_NAME" alias="City" />
            <OUTPUTFIELD name="STATE_NAME" alias="State" />
            <OUTPUTFIELD name="POP1990" alias="Population" />
            <OUTPUTFIELD name="MALES" alias="Male_pop" />
            <OUTPUTFIELD name="FEMALES" alias="Female_pop" />
          </OUTPUTFILE>
        </EXTRACTPARAMS>
        </EXTENSION>
      </LAYER>
    </MAP>
  </CONFIG>
</ARCXML>