SCALEBAR

Used in

CONFIG  REQUEST  RESPONSE  

Servers

Image  ArcMap  

Parent elements

CONFIG  OBJECT 

Syntax

<SCALEBARAttribute 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:
     (r)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="centimeter | feet | inches | kilometers | meters | miles | nautical_miles | points | yards" [miles]
     screenlength="integer"

     When parent element is OBJECT with Image Server:
     (r)coords="double"
     adjustscalebarsize="true | false" [true]
     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="centimeter | decimeter | feet | inches | kilometers | meters | miles | nautical_miles | uk_nautical_miles | us_nautical_miles | us_survey_inches | us_survey_feet | us_survey_miles | us_survey_yards | yards" [miles]
     screenlength="integer"
     texttransparency="0.0 - 1.0" [1]
>

     No Child Elements
</SCALEBAR >
(r): 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-Java Edition or the ArcIMS Java Viewers.

Restrictions


Attribute Descriptions for SCALEBAR


When parent element is CONFIG in a viewer configuration file:
AttributeUsage
backcolorBackground color using RGB values.
fontcolorFont color using RGB values.
mapunitsScale bar units.
scaleunitsScale units.
screenunitsScreen units.

When parent element is OBJECT with Image Server:
AttributeUsage
adjustscalebarsizeWhen "false", the screenlength value does not include the width of the scale value text.
antialiasingUsed 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.
barcolorScale bar color using RGB values.
bartransparencyValue to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent.
barwidthScale bar width in pixels.
coordsScale 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.
distanceSets the length of the scale bar to always be the distance specified. The distance units are the same as the scaleunits.
fontFont 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.
fontcolorFont color using RGB values.
fontsizeFont size.
fontstyleFont style.
mapunitsData units on map.
modeUsed 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.
outlineOutline color for text using RGB values.
overlapDetermines 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.
precisionNumber of decimal places.
roundNumber of digits to round.
scaleunitsScreen units.
screenlengthScale bar length in pixels.
texttransparencyValue to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent.
Back to top 

Examples for SCALEBAR

Example 1: When in an acetate layer in a map configuration file or REQUEST.
<?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.
<?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="-178.21" miny="18.92" maxx="-66.96" maxy="71.41" 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>

Back to top