ArcGIS Explorer Component Help |
FeatureRenderer..::.SetSymbol Method |
FeatureRenderer Class Example See Also |
Sets the symbol used for the FeatureRenderer
Namespace:
ESRI.ArcGISExplorer.MappingAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public virtual void SetSymbol( Symbol symbol ) |
Visual Basic (Declaration) |
---|
Public Overridable Sub SetSymbol ( _ symbol As Symbol _ ) |
Parameters
- symbol
- Type: ESRI.ArcGISExplorer.Mapping..::.Symbol
The symbol for the FeatureRenderer
Examples
The code below illustrates how to use the SetSymbol method to symbolize road hazard data in a forestry geodatabase with a red warning symbol.
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