SCALEBAR  Examples
 
Used in:  CONFIG   REQUEST  
Servers: 
Image   ArcMap  
Parent elements: 
CONFIG   OBJECT  
<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.
 
 

Description:

    SCALEBAR is used two ways. When the parent element is OBJECT, SCALEBAR defines the look and feel of the scale bar in the acetate layer. When the parent element is CONFIG, SCALEBAR defines the look and feel of the scale bar applet in ArcExplorer 4 or the ArcIMS Java Viewers.
 

Restrictions:

Notes:

    None
 

Attribute Descriptions for SCALEBAR:

 
When parent element is CONFIG in a viewer configuration file:
Attribute Usage Back to Top
backcolor 1 Background color using RGB values.
fontcolor 2 Font color using RGB values.
mapunits 3 Scale bar units.
scaleunits 4 Scale units.
screenunits 5 Screen units.
 
When parent element is OBJECT with Image and ArcMap Servers:
Attribute Usage Back to Top
antialiasing 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.
barcolor 2 Scale bar color using RGB values.
bartransparency 3 Value to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent.
barwidth 4 Scale bar width in pixels.
coords 5 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 6 Sets the length of the scale bar to always be the distance specified. The distance units are the same as the scaleunits.
font 7 Font name. The name is case sensitive. If font name uses "&", use "&amp;" instead. For example, ESRI Transportation & Civic should be written as ESRI Transportation &amp; Civic. For Feature Services, the font must reside on the client machine or else the system default font is used.
fontcolor 8 Font color using RGB values.
fontsize 9 Font size.
fontstyle 10 Font style.
mapunits 11 Data units on map.
mode 12 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 13 Outline color for text using RGB values.
overlap 14 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 15 Number of decimal places.
round 16 Number of digits to round.
scaleunits 17 Screen units.
screenlength 18 Scale bar length in pixels.
textransparency 19 Value to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent.
 

Examples for SCALEBAR:

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>