ESRI.ArcGIS.ADF.IMS
ScaleDependentRenderer Constructor()
See Also  Example
ESRI.ArcGIS.ADF.IMS.Display.Renderer Namespace > ScaleDependentRenderer Class > ScaleDependentRenderer Constructor : ScaleDependentRenderer Constructor()




Constructs a ScaleDependentRenderer object.

Syntax

Visual Basic (Declaration) 
Public Function New()
Visual Basic (Usage)Copy Code
Dim instance As ScaleDependentRenderer()
C# 
public ScaleDependentRenderer()

Example

The following example creates a new ScaleDependentRendrer, creates a renderer to place inside it, and assigns the ScaleDependentRenderer to an existing map layer.
Visual BasicCopy Code
' Create the scale-dependent renderer and set its scale properties

Dim scaleDepRend As New ScaleDependentRenderer()

scaleDepRend.MinScale = "1:1000000"

scaleDepRend.MaxScale = "1:20000000"



' Set the renderer inside the scale-dependent renderer

Dim simpleRend As New SimpleRenderer()

Dim simpleFillSymb As New SimpleFillSymbol(Drawing.Color.Beige, Drawing.Color.Sienna, PolygonFillType.DiagCross)

simpleRend.Symbol = simpleFillSymb

scaleDepRend.Renderer = simpleRend



' Assign the scale-dependent renderer to an existing map layer

Dim layer As FeatureLayer = mapView.Layers.FindByName("Countries")

layer.Renderer = scaleDepRend

C#Copy Code
// Create the scale-dependent renderer and set its scale properties 

ScaleDependentRenderer scaleDepRend = new ScaleDependentRenderer() 

scaleDepRend.MinScale = "1:1000000"; 

scaleDepRend.MaxScale = "1:20000000"; 

  

// Set the renderer inside the scale-dependent renderer 

SimpleRenderer simpleRend = new SimpleRenderer(); 

SimpleFillSymbol simpleFillSymb = new SimpleFillSymbol(Drawing.Color.Beige, Drawing.Color.Sienna, PolygonFillType.DiagCross); 

simpleRend.Symbol = simpleFillSymb; 

scaleDepRend.Renderer = simpleRend; 

  

// Assign the scale-dependent renderer to an existing map layer 

FeatureLayer layer = mapView.Layers.FindByName("Countries"); 

layer.Renderer = scaleDepRend; 

    

See Also

© 2010 All Rights Reserved.