English

Problem: GroupRenderer with ActiveX Connector generates bad ArcXML for dynamic layers

Description

When applying a GroupRenderer on a dynamically generated layer in the ActiveX Connector, the dynamical layer is not correctly drawn.

Cause

Instead of containing nested renderers, the <GROUPRENDERER> tag is empty. This is a known issue in ArcIMS 4.0, and was fixed in ArcIMS 4.0.1.

Solution or Workaround

If you want to render a dynamically added layer with a GROUPRENDERER using the ActiveX Connector in ArcIMS 4.0, then the workaround is to build an ArcXML request and send the request to the server using the ArcIMSConnector.SendAxlRequest() method. This method returns an ArcXML response string that contains the URL to the output image generated by the ArcIMS Spatial Server. This URL can be parsed out and displayed in your application.

For example, assume you have a service that contains USA states and cities. If you want to dynamically add a rivers layer, render the rivers in blue, and label the features with their respective names (rendering and labeling requires a GROUPRENDERER). The AXL request would appear like this:

Code:

<ARCXML version="1.1">
<REQUEST>
<GET_IMAGE>
<PROPERTIES>
<BACKGROUND color="255,255,255"/>
<IMAGESIZE width="600" height="400"/>
<LAYERLIST>
<LAYERDEF visible="true" id="ID:53342" type="line">
<GROUPRENDERER>
<SIMPLERENDERER>
<SIMPLELINESYMBOL captype="round" color="0,0,255"/>
</SIMPLERENDERER>
<SIMPLELABELRENDERER field="Name">
<TEXTSYMBOL antialiasing="true" fontsize="10"/>
</SIMPLELABELRENDERER>
</GROUPRENDERER>
</LAYERDEF>
</LAYERLIST>
</PROPERTIES>
<WORKSPACES>
<SHAPEWORKSPACE name="Rivers" directory="C:\ESRI\ESRIDATA\USA"/>
</WORKSPACES>
<LAYER type="featureclass" name="Rivers" visible="true" maxscale="20000000000" minscale="0" id="ID:53342">
<DATASET type="line" name="Rivers" workspace="Rivers"/>
</LAYER>
</GET_IMAGE>
</REQUEST>
</ARCXML>