LEGEND | Examples |
<LEGEND | Attribute
Description Table |
When parent element is IMAGE: file ="string" url ="string" When parent element is PROPERTIES when using ArcMap Server: autoextend ="true | false" [false] backgroundcolor ="0,0,0 - 255,255,255" display ="true | false" [true] font ="Any system font" [Arial] layerfontsize ="integer" [10] swatchheight ="integer" [14] swatchwidth ="integer" [18] title ="string" titlefontsize ="integer" [12] valuefontsize ="integer" [8] When parent element is PROPERTIES when using Image Server: anitaliasing ="true | false" [true] autoextend ="true | false" [false] backgroundcolor ="0,0,0 - 255,255,255" cansplit ="true | false" [false] cellspacing ="integer" [2] columns ="integer" [1] display ="true | false" [true] font ="Any system font" [Arial] height ="1 - NNN" [300] layerfontsize ="integer" [10] reverseorder ="true | false" [false] splittext ="string" [(cont)] swatchheight ="integer" [14] swatchwidth ="integer" [18] title ="string" titlefontsize ="integer" [12] transcolor ="0,0,0 - 255,255,255" valuefontsize ="integer" [8] width ="1 - NNN" [125] > When parent element is IMAGE: No Child Elements When parent element is PROPERTIES when using ArcMap Server: No Child Elements When parent element is PROPERTIES when using Image Server: (m) <LAYERS... /> </LEGEND > |
|
Bold:
Attribute or child element is required. (m): Child element can be used multiple times. |
Attributes available when using an Image Service and no layers contain a value map. | |
Attributes available when using an Image Service and at least one layer contains a value map. | |
Attributes available when using an ArcMap Image Service and no layers contain a value map. | |
Attributes available when using an ArcMap Image Service and at least one layer contains a value map. |
Attribute | Usage | Back to Top |
---|---|---|
file | 1 Full pathname and filename for location of legend image generated by the ArcIMS Spatial Server. Image is written to the ArcIMS Spatial Server's output directory by default. UNC pathnames are valid (\\myComputer\arcims\output). | |
url | 2 URL used by client to retrieve legend image. |
Attribute | Usage | Back to Top |
---|---|---|
autoextend | 1 Extends the legend to accommodate information for all layers. Should always be set to "true" with ArcMap Server. | |
backgroundcolor | 2 Legend’s background color using RGB values. | |
display | 3 Turns legend on or off. | |
font | 4 Font for title. The name is case sensitive. If font name uses "&", use "&" instead. For example, ESRI Transportation & Civic should be written as ESRI Transportation & Civic. | |
layerfontsize | 5 Sets the font size of the subheading for layers that include a value map. | |
swatchheight | 6 Height of the symbol swatch in pixels. | |
swatchwidth | 7 Width of the symbol swatch in pixels. | |
title | 8 Title of legend. | |
titlefontsize | 9 Font size for title. | |
valuefontsize | 10 For layers that include a value map, it sets the font size for value map labels. For layers with no value map, it sets the font size for the layer name. |
Attribute | Usage | Back to Top |
---|---|---|
anitaliasing | 1 Used to make edges of labels and symbols smoother. When set to "true", antialiasing is active. Note that the time to generate a map may significantly increase when antialiasing is turned on. | |
autoextend | 2 If "true", automatically extends legend vertically past size specified in height, if needed. | |
backgroundcolor | 3 Legend’s background color using RGB values. | |
cansplit | 4 Allows splitting of valuemap layers between columns. | |
cellspacing | 5 Defines number of pixels to pad between entries. | |
columns | 6 Defines number of columns in legend. | |
display | 7 Turns legend on or off. | |
font | 8 Font for title. The name is case sensitive. If font name uses "&", use "&" instead. For example, ESRI Transportation & Civic should be written as ESRI Transportation & Civic. For Feature Services, the font must reside on the client machine or else the system default font is used. | |
height | 9 Legend height in pixels. | |
layerfontsize | 10 Font size for layer labels. | |
reverseorder | 11 Reverse order of layers. | |
splittext | 12 Text that displays in bottom of a column if a valuemap is carried over into the next column. | |
swatchheight | 13 Height of the symbol swatch in pixels. | |
swatchwidth | 14 Width of the symbol swatch in pixels. | |
title | 15 Title of legend. | |
titlefontsize | 16 Font size for title. | |
transcolor | 17 Transparency color using RGB values. White is 255,255,255. | |
valuefontsize | 18 Font size for value map labels. | |
width | 19 Legend width in pixels. |
Example 1: When in an IMAGE response and LEGEND is restricted. | Back to Top |
<?xml version="1.0"
encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <LEGEND url="http://mymachine.domain.com/output/Iextensions_MYMACHINE4094163.jpg" /> </IMAGE> </RESPONSE> </ARCXML> |
Example 2: When in an IMAGE response with no restrictions on LEGEND. | Back to Top |
<?xml version="1.0"
encoding="UTF8"?> <ARCXML version="1.1"> <RESPONSE> <IMAGE> <LEGEND file="D:\ArcIMS\output\Iextensions_MYMACHINE4094163.jpg" url="http://mymachine.domain.com/output/Iextensions_MYMACHINE4094163.jpg" /> </IMAGE> </RESPONSE> </ARCXML> |
Example 3: GET_IMAGE request where layers with ID of "0" and "1" are removed from the legend list. | Back to Top |
<?xml version="1.0"
encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <LEGEND title="Legend" font="Arial" autoextend="true" columns="1" width="170" height="300" backgroundcolor="255,255,0" > <LAYERS> <LAYER id="0"/> <LAYER id="1"/> </LAYERS> </LEGEND> <DRAW map="false"/> </PROPERTIES> </GET_IMAGE> </REQUEST> </ARCXML> |
Example 4: Map configuration file where layers with ID of "0" and "1" are removed from the legend list. | 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" /> <LEGEND title="Legend" font="Arial" autoextend="true" columns="1" width="170" height="300" backgroundcolor="255,255,0" > <LAYERS> <LAYER id="0"/> <LAYER id="1"/> </LAYERS> </LEGEND> </PROPERTIES> <WORKSPACES> <SHAPEWORKSPACE name="shp_ws-0" directory="<path to WORLD ESRIDATA>" /> <SHAPEWORKSPACE name="shp_ws-2" directory="<path to USA ESRIDATA>" /> <SHAPEWORKSPACE name="shp_ws-3" directory="<path to CANADA ESRIDATA>" /> </WORKSPACES> <LAYER type="featureclass" name="WORLD30" visible="true" id="0"> <DATASET name="WORLD30" type="polygon" workspace="shp_ws-0" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="0,153,255" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="CNTRY94" visible="true" id="1"> <DATASET name="CNTRY94" type="polygon" workspace="shp_ws-0" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="255,255,153" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="United States" visible="true" id="2"> <DATASET name="STATES" type="polygon" workspace="shp_ws-2" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="255,0,0" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="Canada" visible="true" id="3"> <DATASET name="province" type="polygon" workspace="shp_ws-3" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL filltype="solid" fillcolor="0,153,0" /> </SIMPLERENDERER> </LAYER> <LAYER type="featureclass" name="World Cities" visible="true" id="4"> <DATASET name="CITIES" type="point" workspace="shp_ws-0" /> <SIMPLERENDERER> <SIMPLEMARKERSYMBOL color="102,0,102" width="8.0" /> </SIMPLERENDERER> </LAYER> </MAP> </CONFIG> </ARCXML> |