ESRI.ArcGIS.ADF.IMS
ScaleDependentRenderer Class
Members  See Also 
ESRI.ArcGIS.ADF.IMS.Display.Renderer Namespace : ScaleDependentRenderer Class




A Renderer object for displaying different symbologies at different scales.

Object Model


Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class ScaleDependentRenderer 
   Inherits Renderer
Visual Basic (Usage)Copy Code
Dim instance As ScaleDependentRenderer
C# 
[SerializableAttribute()]
public class ScaleDependentRenderer : Renderer 

Remarks

The ScaleDependentRenderer allows displaying features and/or labels only within certain scales. Display can be set so that a renderer displays and full extent but not at zoomed-in scales, or so that it displays only when zoomed in, or so that it displays only within a certain range of scales. Any other renderer can be inside the ScaleDependentRenderer via the Renderer property, including GroupRenderer.

Scales can be set 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 above for meters. 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 above for meters. 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.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Display.Renderer.Renderer
      ESRI.ArcGIS.ADF.IMS.Display.Renderer.ScaleDependentRenderer

See Also

© 2010 All Rights Reserved.