Encapsulates the visual representation of vector data on a map.

Namespace:  ESRI.ArcGISExplorer.Mapping

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public class FeatureRenderer
Visual Basic (Declaration)
Public Class FeatureRenderer

Remarks

Spatial vector data is can be added to a map using the FeatureLayer class. The FeatureRenderer class allows you to control the symbol used to draw FeatureLayer data on a map. The symbol type used for the renderer will depend on the geometry type of the FeatureLayer. If the FeatureLayer.Renderer property is not set, or is invalid for the geometry type, the FeatureLayer will be symbolized using an ArcGIS Explorer default symbol. The table below indicates the type of symbol that can be used for a specified geometry, and ArcGIS Explorer symbol defaults.

Geometry TypeSymbol Type
Point and MultipointMarker symbol, Default: Orange Stickpin
PolylineLine symbol, Default: Red Solid Line
Polygon and MultipatchFill symbol, Default: Red Solid Fill

The specific size and color of the symbol used can be changed by using the SetSymbol(Symbol) method, or retrieved using the GetSymbol()()() method.

Examples

The code below connects a layer to road hazard point data in a forestry geodatabase. The layer is symbolized using a marker symbol. If the map display mode is switched to 3D the layer symbols will be displayed upright and facing forward, at right angles to the horizon.
CopyC#
//Create a DataSourceProperties object that holds connection information for road hazards in the forestry geodatabase
DataSourceProperties featureLayerDataSourceProps = new DataSourceProperties(@"C:\Data\Forestry.gdb", "road_hazards");
//Create a feature layer referencing the road hazards
FeatureLayer featureLayer = new FeatureLayer(featureLayerDataSourceProps);
//Connect the layer to the data
if (featureLayer.Connect())
{
  //If the connection was successful
  //Set hazards to use a red warning symbol
  featureLayer.Renderer.SetSymbol(Symbol.Marker.Transportation.WarningRed);
  //Specify that the symbols stand upright in 3D
  featureLayer.Renderer.BillboardSymbols = true;
  //Add layer to the map
  ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems.Add(featureLayer);
}
CopyVB.NET
'Create a DataSourceProperties object that holds connection information for road hazards in the forestry geodatabase
Dim featureLayerDataSourceProps As New DataSourceProperties("C:\Data\Forestry.gdb", "road_hazards")
'Create a feature layer referencing the road hazards
Dim featureLayer As New FeatureLayer(featureLayerDataSourceProps)
'Connect the layer to the data
If featureLayer.Connect() Then
  'If the connection was successful
  'Set hazards to use a red warning symbol
  featureLayer.Renderer.SetSymbol(Symbol.Marker.Transportation.WarningRed)
  'Specify that the symbols stand upright in 3D
  featureLayer.Renderer.BillboardSymbols = True
  'Add layer to the map
  ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems.Add(featureLayer)
End If

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Mapping..::.FeatureRenderer

See Also