SCALEBAR | Examples |
<SCALEBAR | Attribute
Description Table |
When parent element is CONFIG in a viewer configuration file: backcolor ="0,0,0 - 255,255,255" [192,192,192] fontcolor ="0,0,0 - 255,255,255" [0,0,0] mapunits ="decimal_degrees | feet | meters" [As defined in map configuration file] scaleunits ="miles | feet | meters | kilometers" [feet] screenunits ="inches | centimeters" [inches] When parent element is OBJECT with ArcMap Server: coords ="double" barcolor ="0,0,0 - 255,255,255" [255, 162, 115] barwidth ="integer" [5] font ="Any system font" [Arial] fontcolor ="0,0,0 - 255,255,255" [0,0,0] fontsize ="integer" [10] fontstyle ="regular | bold | italic | underline | outline | bolditalic" [regular] mapunits ="degrees | meters | feet" [degrees] scaleunits ="miles | feet | meters | kilometers" [miles] screenlength ="integer" When parent element is OBJECT with Image Server: coords ="double" antialiasing ="true | false" [false] barcolor ="0,0,0 - 255,255,255" [255, 162, 115] bartransparency ="0.0 - 1.0" [1] barwidth ="integer" [5] distance ="double" font ="Any system font" [Arial] fontcolor ="0,0,0 - 255,255,255" [0,0,0] fontsize ="integer" [10] fontstyle ="regular | bold | italic | underline | outline | bolditalic" [regular] mapunits ="degrees | meters | feet" [degrees] mode ="cartesian | geodesic" [cartesian] outline ="0,0,0 - 255,255,255" overlap ="true | false" [true] precision ="integer" [0] round ="double" scaleunits ="miles | feet | meters | kilometers" [miles] screenlength ="integer" textransparency ="0.0 - 1.0" [1] > No Child Elements </SCALEBAR > | |
Bold: Attribute or child element is
required. |
Attribute | Usage | Back to Top |
---|---|---|
backcolor | Background color using RGB values. | |
fontcolor | Font color using RGB values. | |
mapunits | Scale bar units. | |
scaleunits | Scale units. | |
screenunits | Screen units. |
Attribute | Usage | Back to Top |
---|---|---|
antialiasing | 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. | |
barcolor | Scale bar color using RGB values. | |
bartransparency | Value to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent. | |
barwidth | Scale bar width in pixels. | |
coords | Scale bar placement location. Coordinate pair is separated by white space by default. The separator can be changed by using SEPARATORS. If using pixel coordinates, "0 0" is in the lower left corner of the map viewer area. | |
distance | Sets the length of the scale bar to always be the distance specified. The distance units are the same as the scaleunits. | |
font | Font name. 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. | |
fontcolor | Font color using RGB values. | |
fontsize | Font size. | |
fontstyle | Font style. | |
mapunits | Data units on map. | |
mode | Used when the map units are in decimal degrees. When the mode is "geodesic", the Image Server takes into account the position on the globe when calculating the size of the scale bar symbol. When the mode is "cartesian", the Image Server uses the same calculation for the scale bar for all points on the globe. The calculation is made at the equator. | |
outline | Outline color for text using RGB values. | |
overlap | Determines if labels can overlap this symbol. When "true", labels can overlap. When "false", labels will not overlap the symbol. If labels are not drawing as expected, check if overlap is set to "false" for this symbol or any other symbol in the ArcIMS service. | |
precision | Number of decimal places. | |
round | Number of digits to round. | |
scaleunits | Screen units. | |
screenlength | Scale bar length in pixels. | |
textransparency | Value to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent. |
Example 1: When in an acetate layer in a map configuration file or REQUEST. | Back to Top |
<?xml version="1.0"
encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_IMAGE> <PROPERTIES> <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="90" /> </PROPERTIES> <LAYER type="acetate" name="scalebar" visible="true" id="acetate"> <OBJECT units="pixel"> <SCALEBAR fontcolor="0,0,0" coords="250 20" barcolor="255,255,255" fontsize="12" screenlength="300" barwidth="3" mapunits="degrees" antialiasing="true" mode="geodesic" /> </OBJECT> </LAYER> </GET_IMAGE> </REQUEST> </ARCXML> |
Example 2: When in a viewer configuration file and used to display a scale bar in the Java viewers. | 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="6803364.430246" miny="1840363.881158" maxx="6819426.753985" maxy="1851351.050505" name="Initial_Extent" /> <MAPUNITS units="decimal_degrees" /> </PROPERTIES> <WORKSPACES> <SHAPEWORKSPACE name="shp_ws-8" directory="<path to data>"/> </WORKSPACES> <LAYER type="featureclass" name="city" visible="true" id="0"> <DATASET name="4" type="polygon" workspace="shp_ws-8" /> <SIMPLERENDERER> <SIMPLEPOLYGONSYMBOL fillcolor="127,27,127" filltype="solid" /> </SIMPLERENDERER> </LAYER> </MAP> <SCALEBAR backcolor="192,192,192" fontcolor="0,0,0" mapunits="decimal_degrees" scaleunits="FEET" screenunits="INCHES" /> </CONFIG> </ARCXML> |