TARGETLAYER

Used in

REQUEST  

Servers

Image  Query  Feature  ArcMap  

Parent elements

BUFFER 

Syntax

<TARGETLAYERAttribute Description Table

     When parent element is GET_FEATURES (Image Service using a dynamic layer):
     (r)id="string"
     (r)type="featureclass"

     When parent element is GET_IMAGE, GET_EXTRACT, GET_FEATURES (referencing an existing layer):
     (r)id="string"
>

     <DATASET... /> [Image Services only]

</TARGETLAYER >
(r): Attribute or child element is required.

Description

Defines a target layer for selecting features based on a buffer in the same or different layer in the ArcIMS service.

Restrictions


Attribute Descriptions for TARGETLAYER


When parent element is GET_FEATURES (Image Service using a dynamic layer):
AttributeUsage
idUnique ID for a layer. The ID can be any combination of alpha and numeric characters but cannot duplicate any other layer IDs.
typeSpecifies layer type. The only valid value is "featureclass".

When parent element is GET_IMAGE, GET_EXTRACT, GET_FEATURES (referencing an existing layer):
AttributeUsage
idReferences a previously defined layer ID from the ArcIMS service or request.
Back to top 

Examples for TARGETLAYER

Example 1: When in a GET_FEATURES request.
<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_FEATURES featurelimit="25" beginrecord="0" outputmode="xml" geometry="false" envelope="true" compact="true">
      <LAYER id="2" /> <!-- states -->
      <SPATIALQUERY subfields="#SHAPE# NAME">
        <BUFFER distance="1" >
          <TARGETLAYER id="4" /> <!-- cities -->
          <SPATIALQUERY subfields="NAME" />
        </BUFFER>
        <SPATIALFILTER relation="area_intersection" >
          <ENVELOPE minx="-16154208.3772906" miny="-4165319.9729724" maxx="-4904885.23874079" maxy="4271672.38093997" />
        </SPATIALFILTER>
      </SPATIALQUERY>
    </GET_FEATURES>
  </REQUEST>
</ARCXML>

Example 2: When in a GET_IMAGE request. Note in this example that the DATASET fromlayer is "CITIES". This refers to the LAYER id in the map configuration file, not the LAYER name.
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_IMAGE>
      <PROPERTIES>
        <ENVELOPE minx="867805.08306143" miny="6771243.45626185" maxx="1576642.8482793" maxy="7302871.78017525"/>
      </PROPERTIES>
      <LAYER type="featureclass" name="theBufferTarget" visible="true" id="buffertarget">
        <DATASET fromlayer="CITIES"/>
        <SPATIALQUERY>
          <BUFFER distance="100" bufferunits="miles">
            <TARGETLAYER id="CITIES"/>
          </BUFFER>
          <SPATIALFILTER relation="area_intersection">
            <ENVELOPE minx="867805.08306143" miny="6771243.45626185" maxx="1576642.8482793" maxy="7302871.78017525"/>
          </SPATIALFILTER>
        </SPATIALQUERY>
        <SIMPLERENDERER>
          <SIMPLEMARKERSYMBOL color="255,0,0" />
        </SIMPLERENDERER>
      </LAYER>
      <LAYER type="featureclass" name="theBuffer" visible="true" id="buffer">
        <DATASET fromlayer="CITIES"/>
        <SPATIALQUERY>
          <BUFFER distance="100" bufferunits="miles" />
          <SPATIALFILTER relation="area_intersection">
            <ENVELOPE minx="867805.08306143" miny="6771243.45626185" maxx="1576642.8482793" maxy="7302871.78017525"/>
          </SPATIALFILTER>
        </SPATIALQUERY>
        <SIMPLERENDERER>
          <SIMPLEPOLYGONSYMBOL fillcolor="100,100,100" filltype="solid" filltransparency="0.5" />
        </SIMPLERENDERER>
      </LAYER>        
    </GET_IMAGE>
  </REQUEST>
</ARCXML>

Example 3: When DATASET is used as a child element of a dynamic target layer. (Valid with Image Services only)
<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_FEATURES featurelimit="25" beginrecord="1" outputmode="xml" geometry="false" envelope="false" checkesc="true">
      <LAYER type="featureclass" id="40">
      <DATASET name="CITIES" type="point" workspace="shp_ws-2" />
      </LAYER>
      <SPATIALQUERY>
        <BUFFER distance="800" bufferunits="miles">
          <TARGETLAYER id="41" type="featureclass" >
            <DATASET name="country" type="polygon" workspace="shp_ws-0" />
          </TARGETLAYER>
        </BUFFER>
      </SPATIALQUERY>
    </GET_FEATURES>
  </REQUEST>
</ARCXML>

Back to top