ESRI.ArcGIS.ADF.IMS
HashLineSymbol Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Display.Symbol Namespace : HashLineSymbol Class




Line symbol for drawing railroad symbols.

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class HashLineSymbol 
   Inherits LineSymbol
Visual Basic (Usage)Copy Code
Dim instance As HashLineSymbol
C# 
[SerializableAttribute()]
public class HashLineSymbol : LineSymbol 

Example

This example replaces the existing symbol for a railroads layer with a new HashLineSymbol.
Visual BasicCopy Code
' Create a new hash line symbol and set its properties

Dim hashLineSymb As New HashLineSymbol()

hashLineSymb.Color = Drawing.Color.Black

hashLineSymb.CrossHashVisible = True

hashLineSymb.Width = 2

hashLineSymb.TickInterval = 5

hashLineSymb.TickLength = 4

hashLineSymb.TickWidth = 2

hashLineSymb.Transparency = 30

hashLineSymb.Antialiasing = True

hashLineSymb.AllowLabelOverlap = True



' Retrieve an existing line layer's renderer

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

Dim renderer As SimpleRenderer = layer.Renderer



' Replace the renderer's symbol with the one we created

renderer.Symbol = hashLineSymb

C#Copy Code
// Create a new hash line symbol and set its properties 

HashLineSymbol hashLineSymb = new HashLineSymbol(); 

hashLineSymb.Color = Drawing.Color.Black; 

hashLineSymb.CrossHashVisible = true; 

hashLineSymb.Width = 2; 

hashLineSymb.TickInterval = 5; 

hashLineSymb.TickLength = 4; 

hashLineSymb.TickWidth = 2; 

hashLineSymb.Transparency = 30; 

hashLineSymb.Antialiasing = true; 

hashLineSymb.AllowLabelOverlap = true; 

  

// Retrieve an existing line layer's renderer 

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

SimpleRenderer renderer = layer.Renderer; 

  

// Replace the renderer's symbol with the one we created 

renderer.Symbol = hashLineSymb; 

    

Remarks

The HashLineSymbol can be used to represent railroad lines. Each tick represents a short hash line that crosses the main line. The thickness, length, and interval between ticks can be set.

The following figure shows these properties:

A smoothing algorithm is used on the line to get a better hash effect. If a second line symbol is also used, the smoothing algorithm is not applied, and this line will not overlay exactly with the hashline. In order to make the second line overlay the hashline, use HashLineSymbol and set CrossHashVisible to "false".

For ArcMap Server image services, valid only for acetate layers. ArcMap Server ignores several of the properties of this class. For details, see the topic for HASHLINESYMBOL in the ArcIMS Help, at ArcXML Guide - Symbol elements - HASHLINESYMBOL. The ArcIMS Help is also available online at ESRI).

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Display.Symbol.Symbol
      ESRI.ArcGIS.ADF.IMS.Display.Symbol.FeatureSymbol
         ESRI.ArcGIS.ADF.IMS.Display.Symbol.LineSymbol
            ESRI.ArcGIS.ADF.IMS.Display.Symbol.HashLineSymbol

See Also

© 2010 All Rights Reserved.