LAYERDEF  Examples

Used in:  CONFIG   REQUEST  
Parent elements:  LAYERLIST   OVERVIEWMAP  

<LAYERDEF Attribute Description Table


     When parent element is LAYERLIST in GET_IMAGE or GET_EXTRACT request:
     id ="string"
     name ="string"
     visible ="true | false"  [As defined in map configuration file]

     When parent element is OVERVIEWMAP in a viewer configuration file:
     name ="string"
>


     When parent element is LAYERLIST in GET_EXTRACT request:
     <QUERY... />  [Either SPATIALQUERY or QUERY but not both]
     <SPATIALQUERY... />  [Either SPATIALQUERY or QUERY but not both]

     When parent element is LAYERLIST in GET_IMAGE request:
     <QUERY... />  [Either SPATIALQUERY or QUERY but not both]
     <SPATIALQUERY... />  [Either SPATIALQUERY or QUERY but not both]
     <GROUPRENDERER... />  [Or]
     <SCALEDEPENDENTRENDERER... />  [Or]
     <SIMPLELABELRENDERER... />  [Or]
     <SIMPLERENDERER... />  [Or]
     <VALUEMAPLABELRENDERER... />  [Or]
     <VALUEMAPRENDERER... />  [Or]

     When parent element is OVERVIEWMAP in a viewer configuration file:
          No child elements

</LAYERDEF >
Bold: Attribute or child element is required.


Description:


Restrictions:


Notes:


Attribute Descriptions for LAYERDEF:


When parent element is LAYERLIST in GET_IMAGE or GET_EXTRACT request:
Attribute Usage Back to Top
id Reference to unique layer ID as defined in map configuration file or in a dynamic layer in the request.
name Reference to layer name as defined in map configuration file or in a dynamic layer in the request.
visible Turns layer on or off.

When parent element is OVERVIEWMAP in a viewer configuration file:
Attribute Usage Back to Top
name Reference to layer name.
 

Examples for LAYERDEF:

Example 1: When in a GET_IMAGE request. Back to Top
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
  <GET_IMAGE>
    <PROPERTIES>
      <LAYERLIST>
        <LAYERDEF id="1">
          <SIMPLERENDERER>
            <SIMPLEMARKERSYMBOL size="16" color="0,0,0" />
          </SIMPLERENDERER>
         <SPATIALQUERY>
            <SPATIALFILTER relation="area_intersection">      
            <ENVELOPE maxy="60" maxx="60" miny="0" minx="0" />
         </SPATIALFILTER>
         </SPATIALQUERY>
      </LAYERDEF>
      </LAYERLIST>
      <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" />
   </PROPERTIES>
  </GET_IMAGE>
  </REQUEST>
</ARCXML>

Example 2: When used in OVERVIEWMAP. 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="-116.016078" miny="36.252371" maxx="-100.855887" maxy="46.622450" name="Initial_Extent" />
      <MAPUNITS units="decimal_degrees" />
      </PROPERTIES>
      <WORKSPACES>
      <SHAPEWORKSPACE name="shp_ws-0" directory="<path to USA ESRIDATA>" />
      </WORKSPACES>
      <LAYER type="featureclass" name="STATES" visible="true" id="0">
      <DATASET name="STATES" type="polygon" workspace="shp_ws-0" />
      <SIMPLERENDERER>
        <SIMPLEPOLYGONSYMBOL fillcolor="255,0,0" />
      </SIMPLERENDERER>
      </LAYER>
    </MAP>
    <OVERVIEWMAP backgroundcolor="255,255,255" framefillcolor="255,0,0" frameoutlinecolor="255,0,0" zoomfactor="4.0">
      <LAYERDEF name="STATES" />
    </OVERVIEWMAP>
  </CONFIG>
</ARCXML>