com.esri.arcgis.carto
Interface IScaleDependentRenderer

All Superinterfaces:
Serializable
All Known Implementing Classes:
ScaleDependentRenderer

public interface IScaleDependentRenderer
extends Serializable

Provides access to members that control a renderer which is composed of mulitple renderers, of which only one is enabled within a particular scale range.

Description

This interface provides access to a renderer that contains other feature renderers, and it allows you to specify different renderers for different scale ranges. For example, when a user views a layer at its full extent, features can be drawn with one symbology, and when the user zooms in far enough, the symbology can change to another. You can specify as many renderers and scale ranges as you need.

Remarks

For example, you could use this interface to set up a ScaleDependentRenderer when symbolizing a road network. Specify two different sub renderers and scale ranges. When zoomed out to the full extent, all of the roads could be drawn with the same line symbol -- using a SimpleRenderer. When zoomed in, the roads could be drawn based on road class by using a UniqueValueRenderer. With this renderer type, more important roads can be drawn with thicker, cased-line symbols.

The ScaleDependentRenderer is not available using the ArcGIS interface. To use this renderer you must use code to build and assign the renderer to a layer.

You can create scale dependent symbology using multiple layers, instead of multiple renderer assigned to a single layer through a ScaleDependentRenderer. For example, you can set up multiple feature layers and specify valid min and max display scales for each using IFeatureLayer::MinimumScale and IFeatureLayer::MaximumScale. This functionality is available using out of the box ArcGIS. To learn more see the ArcGIS desktop help.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void addRenderer(IFeatureRenderer renderer)
          Adds a renderer to the end of the list.
 double getBreak(int index)
          Scale value at which to break for the specified index.
 Object getRenderer(int index)
          The renderer at the specified index.
 int getRendererCount()
          Number of renderers.
 void moveRenderer(IFeatureRenderer renderer, int toIndex)
          Moves renderer to the specified location in the list.
 void removeRenderer(IFeatureRenderer renderer)
          Removes the specified renderer from the list.
 void setBreak(int index, double breakValue)
          Scale value at which to break for the specified index.
 void setRendererByRef(int index, Object renderer)
          The renderer at the specified index.
 void setRendererCount(int rendererCount)
          Number of renderers.
 

Method Detail

getRendererCount

int getRendererCount()
                     throws IOException,
                            AutomationException
Number of renderers.

Description

Specifies the number of sub renderers currently assigned to the scale dependent renderer. The number of sub renderers is equal to the number of Break values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The rendererCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRendererCount

void setRendererCount(int rendererCount)
                      throws IOException,
                             AutomationException
Number of renderers.

Description

RendererCount is the number of renderers currently assigned to a IScaleDependentRenderer .

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
rendererCount - The rendererCount (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRenderer

Object getRenderer(int index)
                   throws IOException,
                          AutomationException
The renderer at the specified index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRendererByRef

void setRendererByRef(int index,
                      Object renderer)
                      throws IOException,
                             AutomationException
The renderer at the specified index.

Description

Renderer is renderer used to draw features within a given scale range. The number of renderers equals the number of breaks. When setting check RendererCount first to ensure you do not specify an index that is out of range.
As an example of renderers and breaks, if Break(0) = 1,000, Break(1) = 10,000, and Break(2) = 250,000, then renderers are applied in the following manner:

If scale denominator <= 1,000 then features are drawn with Renderer(0).
If 1,000 < scale denominator <= 10,000 then features are drawn with Renderer(1).
If 10,000 < scale denominator <= 250,000 then features are drawn with Renderer(2)
If 250,000 < scale demoninator then NO renderer assigned and features are not drawn.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
renderer - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBreak

double getBreak(int index)
                throws IOException,
                       AutomationException
Scale value at which to break for the specified index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
Returns:
The breakValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBreak

void setBreak(int index,
              double breakValue)
              throws IOException,
                     AutomationException
Scale value at which to break for the specified index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
breakValue - The breakValue (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addRenderer

void addRenderer(IFeatureRenderer renderer)
                 throws IOException,
                        AutomationException
Adds a renderer to the end of the list.

Description

This method adds a feature renderer to a scale dependent renderer. You must then set a corresponding Break to indicate the minimum scale at which the renderer will be used to draw features. For example, set Break(0) = 1,000 to specify that the first sub renderer be used at scales greater than or equal to 1:1,000. 1:500 is an example of a scale that is greater than or equal to 1:1,000.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
renderer - A reference to a com.esri.arcgis.carto.IFeatureRenderer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeRenderer

void removeRenderer(IFeatureRenderer renderer)
                    throws IOException,
                           AutomationException
Removes the specified renderer from the list.

Description

This method removes the specified renderer object from the scale dependent renderer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
renderer - A reference to a com.esri.arcgis.carto.IFeatureRenderer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveRenderer

void moveRenderer(IFeatureRenderer renderer,
                  int toIndex)
                  throws IOException,
                         AutomationException
Moves renderer to the specified location in the list.

Description

This method moves the specified renderer to a different scale range within the scale dependent renderer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
renderer - A reference to a com.esri.arcgis.carto.IFeatureRenderer (in)
toIndex - The toIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.