Controlling Legend Content in ArcIMS with ArcXML

ArcIMS legends can get big and ugly in a hurry. To save space, you may decide your user can figure out the big blue blob labeled “Charlotte” is a city without eating up your web page in legend. Fortunately, with ArcXML you can tell ArcIMS what to put in your legend and what to omit.

We do this with the LEGEND tag of the GET_IMAGE request.

<LEGEND /> By default, all layers visible are in the legend.

Will create a legend with everything in it.

By specifying layers with the LAYERS tag, you can control the legend contents. Interestingly, the layers you specify will be the ones not drawn in the legend. That’s a bit counterintuitive. That’s ESRI.

<LAYER id=”Jurisdictions”>

This code tells ArcIMS to not include the layer “Jurisdictions” in your legend, whether it is visible or not. By listing all the layers your users should be able to understand without additional help, you can save yourself a lot of screen space and keep your legend from growing beyond the area you set aside for it.