ArcXML Programmer's Reference Guide for ArcIMS 9.2
SCALEDEPENDENTRENDERER
Used in
CONFIG REQUEST RESPONSE
Servers
Image Feature
Parent elements
GROUPRENDERER LAYER LAYERDEF LAYERINFO SCALEDEPENDENTRENDERER
Syntax
<SCALEDEPENDENTRENDERER Attribute Description Table
lower="double or string"
upper="double or string"
>
(r)<GROUPRENDERER... /> [Or]
(r)<SCALEDEPENDENTRENDERER... /> [Or]
(r)<SIMPLELABELRENDERER... /> [Or]
(r)<SIMPLERENDERER... /> [Or]
(r)<VALUEMAPLABELRENDERER... /> [Or]
(r)<VALUEMAPRENDERER... /> [Or]
</SCALEDEPENDENTRENDERER >
(r): Attribute or child element is required.
Description
Displays specified rendering information at certain scales. A layer can have different renderings depending on the current scale. For example, when zoomed out, you can draw a street layer one pixel in width. As you zoom farther in, you can draw the street layer eight pixels in width and in a different color.
Restrictions
Only one child element can be used inside a SCALEDEPENDENTRENDERER.
SCALEDEPENDENTRENDERER as a child element to SCALEDEPENDENTRENDERER is not supported in the Java Connector API.
Not valid with ArcMap Server.
Notes
Use SCALEDEPENDENTRENDERER for changing symbology at different scales. To set a scale dependency on a layer so that it is viewable for a specified scale range, use LAYER.
Scales can be set in ArcXML using a relative scale or by calculating the number of map units per pixel. A relative scale represents the scale in a ratio such as 1:24000. In this example, 1 meter equals 24000 meters, or 1 inch equals 24000 inches. When using relative scale, always use a colon (:) between the two values.
Map units per pixel refers to the number of meters, feet, or decimal degrees represented by one pixel in a map. To convert from a relative scale to map units per pixel, the size of a pixel must first be calculated. The formula for finding the number of meters in a pixel is 0.0254 / dpi. The value 0.0254 is the number of meters in an inch, and dpi is the dpi set in the ArcIMS service or request. If no dpi is set in the service or request, the dpi is assumed to be 96. As an example of pixel size, if the dpi is 96, the pixel size is 0.0254 / 96 or 0.000265 m. To convert from a relative scale to map units per pixel:
If the scale is in meters. To calculate the number of meters per pixel, take the relative scale and multiply by 0.000265. For example, if the relative scale is 1:24000, then the number of meters per pixel is 24000 * 0.000265, or 6.36 meters.
If the scale is in feet. Do the calculation for meters (#1). Multiply the result by 3.28 (the number of feet in a meter). For example, if the number of meters per pixel is 6.36, the number of feet is 6.36 * 3.28, or 20.86 feet.
If the scale is in decimal degrees. For these calculations, the Earth is assumed to be an exact sphere with a circumference of 40030.174 km. One degree is 111.195 km (40030.174/360 degrees), or 111195 meters. To calculate the number of degrees, first do the calculation for meters (#1). Next, divide the result by 111195. For example, if the number of meters per pixel is 6.36, the number of degrees is 6.36 / 111195, or 0.0000571968.
If you find that labels are not drawing at certain scales when using multiple SCALEDEPENDENTRENDERERs, try using both upper and lower for each SCALEDEPENDENTRENDERER. If the upper bound is infinity, use a very large number such as 1:10000000000. If no lower bound exists, use 1:1.
<!-- Display features and labels with a lower bound of 1:1000000 and an upper bound of 1:infinity (1:10000000000) -->
<SCALEDEPENDENTRENDERER lower="1:1000000" upper="1:10000000000">
...
</SCALEDEPENDENTRENDERER>
<!-- Display features with an upper bound of 1:1000000 and no lower bound (1:1) -->
<SCALEDEPENDENTRENDERER lower="1:1" upper="1:1000000">
...
</SCALEDEPENDENTRENDERER>
For more information on using renderers, see Using ArcXML Renderers.
Attribute Descriptions for SCALEDEPENDENTRENDERER
Attribute Usage
lower Minimum scale to display renderer using a relative scale such as 1:24000. Scale can also be calculated as the number of map units per pixel.
upper Maximum scale to display renderer using a relative scale such as 1:24000. Scale can also be calculated as the number of map units per pixel.
Back to top
Examples for SCALEDEPENDENTRENDERER
Example 1: Changing road symbology at a scale of 1:20000000.<?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="-158.204086" miny="19.067062" maxx="-67.097816" maxy="70.319496" name="Initial_Extent" />
<MAPUNITS units="decimal_degrees" />
<FILTERCOORDSYS id="4326" />
<FEATURECOORDSYS id="4326"/>
</PROPERTIES>
<WORKSPACES>
<SHAPEWORKSPACE name="shp_ws-2" directory="<path to USA ESRIDATA>" />
</WORKSPACES>
<LAYER type="featureclass" name="ROADS" visible="true" id="0">
<DATASET name="ROADS" type="line" workspace="shp_ws-2" />
<GROUPRENDERER>
<SCALEDEPENDENTRENDERER upper="1:20000000">
<GROUPRENDERER>
<SIMPLERENDERER>
<SIMPLELINESYMBOL type="solid" width="5" color="0,0,0" />
</SIMPLERENDERER>
<SIMPLERENDERER>
<SIMPLELINESYMBOL type="solid" width="3" color="255,0,0" />
</SIMPLERENDERER>
<SIMPLERENDERER>
<SIMPLELINESYMBOL type="solid" width="1" color="255,255,255" />
</SIMPLERENDERER>
</GROUPRENDERER>
</SCALEDEPENDENTRENDERER>
<SCALEDEPENDENTRENDERER lower="1:20000000">
<SIMPLERENDERER>
<SIMPLELINESYMBOL type="solid" width="1" color="255,0,0" />
</SIMPLERENDERER>
</SCALEDEPENDENTRENDERER>
</GROUPRENDERER>
</LAYER>
</MAP>
</CONFIG>
</ARCXML>
Example 2: Using VALUEMAPRENDERER and VALUEMAPLABELRENDERER inside a SCALEDEPENDENTRENDERER.VALUEMAPLABELRENDERER lookupfield="TYPE" labelfield="NAME" <?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="-74.066" miny="40.689" maxx="-73.823" maxy="40.883" name="Initial_Extent" />
<MAPUNITS units="decimal_degrees" />
<FILTERCOORDSYS id="4326" />
<FEATURECOORDSYS id="4326"/>
</PROPERTIES>
<WORKSPACES>
<SHAPEWORKSPACE name="shp_ws-0" directory="path to data" />
</WORKSPACES>
<LAYER type="featureclass" name="Roads" visible="true" id="4" maxscale="1:35000">
<DATASET name="nyc_roads" type="line" workspace="shp_ws-0" />
<GROUPRENDERER>
<SCALEDEPENDENTRENDERER lower="1:21300" >
<VALUEMAPRENDERER lookupfield="ROAD_TYPE">
<EXACT value="Freeway">
<SIMPLELINESYMBOL type="solid" width="3" color="255,0,0" />
</EXACT>
<EXACT value="Street">
<SIMPLELINESYMBOL type="solid" width="1" color="0,0,255" />
</EXACT>
<OTHER>
<SIMPLELINESYMBOL type="solid" width="1" color="0,255,0" />
</OTHER>
</VALUEMAPRENDERER>
</SCALEDEPENDENTRENDERER>
<SCALEDEPENDENTRENDERER upper="1:21300">
<GROUPRENDERER>
<VALUEMAPRENDERER lookupfield="ROAD_TYPE">
<EXACT value="Freeway">
<SIMPLELINESYMBOL type="solid" width="9" color="0,0,0" />
</EXACT>
<EXACT value="Street">
<SIMPLELINESYMBOL type="solid" width="8" color="255,255,255" />
</EXACT>
<OTHER>
<SIMPLELINESYMBOL type="solid" width="1" color="0,0,255" />
</OTHER>
</VALUEMAPRENDERER>
<VALUEMAPRENDERER lookupfield="ROAD_TYPE">
<EXACT value="Freeway">
<SIMPLELINESYMBOL type="solid" width="7" color="255,0,0" />
</EXACT>
</VALUEMAPRENDERER>
<VALUEMAPRENDERER lookupfield="ROAD_TYPE">
<EXACT value="Freeway">
<SIMPLELINESYMBOL type="solid" width="3" color="0,0,0" />
</EXACT>
</VALUEMAPRENDERER>
<VALUEMAPRENDERER lookupfield="ROAD_TYPE">
<EXACT value="Freeway">
<SIMPLELINESYMBOL type="solid" width="1" color="255,255,255" />
</EXACT>
</VALUEMAPRENDERER>
</GROUPRENDERER>
</SCALEDEPENDENTRENDERER>
<SCALEDEPENDENTRENDERER upper="1:25000">
<VALUEMAPLABELRENDERER lookupfield="ROAD_TYPE" labelfield="NAME" linelabelposition="placeontop" howmanylabels="One_label_per_name">
<EXACT value="Freeway">
<TEXTSYMBOL font="Arial" fontsize="14" fontstyle="bold" fontcolor="0,0,255" glowing="153,153,153"/>
</EXACT>
<EXACT value="Street">
<TEXTSYMBOL font="Arial" fontsize="14" fontstyle="bold" fontcolor="0,0,0" />
</EXACT>
<OTHER>
<TEXTSYMBOL font="Arial" fontsize="14" fontstyle="regular" fontcolor="0,0,255" />
</OTHER>
</VALUEMAPLABELRENDERER>
</SCALEDEPENDENTRENDERER>
</GROUPRENDERER>
</LAYER>
</MAP>
</CONFIG>
</ARCXML>
Back to top