Specifies the type of symbol determining what kind of items can be drawn, for example a Marker symbol can be used to draw Point or Multipoint geometries.

Namespace:  ESRI.ArcGISExplorer.Mapping

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

Syntax

C#
public enum SymbolType
Visual Basic (Declaration)
Public Enumeration SymbolType

Members

Member nameDescription
Fill
A Fill symbol, used to symbolize the area geometries Polygon, Envelope and Multipatch.
Line
A Line symbol, used to symbolize linear Polyline geometries.
Marker
A Marker symbol, used to symbolize point geometries, Point and Multipoint.
Unknown
Unknown symbol type. Used internally.

Remarks

The SymbolType enumeration is used in the SymbolType, GeometryTypeToSymbolType, and GetDefault(SymbolType) members of the Symbol class to specify what kind of items can be drawn by a symbol. There is a many-to-1 mapping between types of Geometry and the symbols used to draw each type; the GeometryTypeToSymbolType method can be used to determine the correct SymbolType for a specific GeometryType.

Examples

The code below demonstrates how to obtain the appropriate SymbolType for a specific GeometryType, by using the Symbol.GeometryTypeToSymbolType method.
CopyC#
    //Create a list of geometries
    List<Geometry> geometryList = new List<Geometry>();

    //Create a point
    ESRI.ArcGISExplorer.Geometry.Point point = new ESRI.ArcGISExplorer.Geometry.Point(1, 1);

    //Create a polyline
    Polyline polyline = new Polyline(CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid);
    polyline.AddPoints(new ESRI.ArcGISExplorer.Geometry.Point[] { 
new ESRI.ArcGISExplorer.Geometry.Point(326872.482358681, 673940.581779784), 
new ESRI.ArcGISExplorer.Geometry.Point(326937.296501129, 673957.506541019), 
new ESRI.ArcGISExplorer.Geometry.Point(326953.836608697, 673895.000320552)});

    //Create a polygon
    Polygon polygon = new Polygon();
    // Add a series of points to the Polygon (overloads are available to add multiple Points.
    polygon.AddPoint(new ESRI.ArcGISExplorer.Geometry.Point(2.33434596343321, 48.8628885302916));
    polygon.AddPoint(new ESRI.ArcGISExplorer.Geometry.Point(2.33269733037166, 48.8603451299656));
    polygon.AddPoint(new ESRI.ArcGISExplorer.Geometry.Point(2.33659764618658, 48.8594678571346));
    polygon.AddPoint(new ESRI.ArcGISExplorer.Geometry.Point(2.33960511237599, 48.8591968205275));
    polygon.AddPoint(new ESRI.ArcGISExplorer.Geometry.Point(2.340578062027, 48.8608773611669));
    // Ensure the Polygon is a closed shape.
    polygon.Close();

    //Add to the list of geometries
    geometryList.Add(point);
    geometryList.Add(polyline);
    geometryList.Add(polygon);

    //Loop through the list of geometries
    foreach (Geometry geometry in geometryList)
    {

        Graphic graphic = new Graphic(geometry);

        //Get symbol type for the geometry type
        switch (Symbol.GeometryTypeToSymbolType(geometry.GeometryType))
        {
            case SymbolType.Fill:
                graphic.Symbol = Symbol.Fill.Solid.Blue;
                break;
            case SymbolType.Line:
                graphic.Symbol = Symbol.Line.Solid.LightBlue;
                break;
            case SymbolType.Marker:
                graphic.Symbol = Symbol.Marker.Pushpin.Blue;
                break;
            case SymbolType.Unknown:
                break;
        }

        ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Graphics.Add(graphic);
    }
CopyVB.NET
'Create a list of geometries
Dim geometryList As New List(Of Geometry)()

'Create a point
Dim point As New ESRI.ArcGISExplorer.Geometry.Point(1, 1)

'Create a polyline
Dim polyline As New ESRI.ArcGISExplorer.Geometry.Polyline(CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid)
polyline.AddPoints(New ESRI.ArcGISExplorer.Geometry.Point() {New ESRI.ArcGISExplorer.Geometry.Point(326872.482358681, 673940.581779784), New ESRI.ArcGISExplorer.Geometry.Point(326937.296501129, 673957.506541019), New ESRI.ArcGISExplorer.Geometry.Point(326953.836608697, 673895.000320552)})

'Create a polygon
Dim polygon As New ESRI.ArcGISExplorer.Geometry.Polygon()
' Add a series of points to the Polygon (overloads are available to add multiple Points.
polygon.AddPoint(New ESRI.ArcGISExplorer.Geometry.Point(2.33434596343321, 48.8628885302916))
polygon.AddPoint(New ESRI.ArcGISExplorer.Geometry.Point(2.33269733037166, 48.8603451299656))
polygon.AddPoint(New ESRI.ArcGISExplorer.Geometry.Point(2.33659764618658, 48.8594678571346))
polygon.AddPoint(New ESRI.ArcGISExplorer.Geometry.Point(2.33960511237599, 48.8591968205275))
polygon.AddPoint(New ESRI.ArcGISExplorer.Geometry.Point(2.340578062027, 48.8608773611669))
' Ensure the Polygon is a closed shape.
polygon.Close()

'Add to the list of geometries
geometryList.Add(point)
geometryList.Add(polyline)
geometryList.Add(polygon)

'Loop through the list of geometries
For Each geometry As ESRI.ArcGISExplorer.Geometry.Geometry In geometryList

    Dim graphic As New Graphic(geometry)

    'Get symbol type for the geometry type
    Select Case Symbol.GeometryTypeToSymbolType(geometry.GeometryType)
        Case SymbolType.Fill
            graphic.Symbol = Symbol.Fill.Solid.Blue
            Exit Select
        Case SymbolType.Line
            graphic.Symbol = Symbol.Line.Solid.LightBlue
            Exit Select
        Case SymbolType.Marker
            graphic.Symbol = Symbol.Marker.Pushpin.Blue
            Exit Select
        Case SymbolType.Unknown
            Exit Select
    End Select

    ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Graphics.Add(graphic)
Next

See Also