Packagecom.esri.ags.symbols
Classpublic class SimpleLineSymbol
InheritanceSimpleLineSymbol Inheritance LineSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher
Subclasses CartographicLineSymbol

Used to draw linear features on the graphics layer using simple line patterns. SimpleLineSymbol is either a solid line or a predefined pattern of dashes and dots.

View the examples

See also

CartographicLineSymbol
Live sample - Line Symbols
Live sample - Change Line Symbols on-the-fly


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
Line symbol alpha (transparency).
LineSymbol
 Inheritedcolor : uint
Line symbol color.
LineSymbol
  style : String
The line style.
SimpleLineSymbol
 Inheritedwidth : Number
Line symbol width in pixels.
LineSymbol
Public Methods
 MethodDefined By
  
SimpleLineSymbol(style:String = solid, color:Number = 0x000000, alpha:Number = 1, width:Number = 1)
Creates a new SimpleLineSymbol.
SimpleLineSymbol
 Inherited
clear(sprite:Sprite):void
Clears the graphics that were drawn to the sprite object.
Symbol
 Inherited
createSwatch(width:Number = 50, height:Number = 50):UIComponent
Creates a swatch for a symbol which can be used in a legend.
Symbol
 Inherited
destroy(sprite:Sprite):void
Removes all the graphics that were drawn to the sprite object and resets its properties.
Symbol
 Inherited
draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Draw the graphics on the sprite object.
Symbol
 Inherited
initialize(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Initialize the sprite.
Symbol
Protected Methods
 MethodDefined By
 Inherited
Helper function to dispatch a change event.
Symbol
 Inherited
removeAllChildren(sprite:Sprite):void
Removes all children from the sprite object.
Symbol
 Inherited
toScreenX(map:Map, mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Symbol
 Inherited
toScreenY(map:Map, mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Symbol
Public Constants
 ConstantDefined By
  STYLE_DASH : String = dash
[static] The line is made of dashes.
SimpleLineSymbol
  STYLE_DASHDOT : String = dashdot
[static] The line is made of a dash-dot pattern.
SimpleLineSymbol
  STYLE_DASHDOTDOT : String = dashdotdot
[static] The line is made of a dash-dot-dot pattern.
SimpleLineSymbol
  STYLE_DOT : String = dot
[static] The line is made of dots.
SimpleLineSymbol
  STYLE_NULL : String = none
[static] The line has no symbol.
SimpleLineSymbol
  STYLE_SOLID : String = solid
[static] The line is solid.
SimpleLineSymbol
Property Detail
styleproperty
style:String

The line style.

The default value is STYLE_SOLID.


Implementation
    public function get style():String
    public function set style(value:String):void
Constructor Detail
SimpleLineSymbol()Constructor
public function SimpleLineSymbol(style:String = solid, color:Number = 0x000000, alpha:Number = 1, width:Number = 1)

Creates a new SimpleLineSymbol.

Parameters
style:String (default = solid) — The line style.
 
color:Number (default = 0x000000) — The line color.
 
alpha:Number (default = 1) — The line transparency.
 
width:Number (default = 1) — The line thickness in pixels.
Constant Detail
STYLE_DASHConstant
public static const STYLE_DASH:String = dash

The line is made of dashes.

STYLE_DASHDOTConstant 
public static const STYLE_DASHDOT:String = dashdot

The line is made of a dash-dot pattern.

STYLE_DASHDOTDOTConstant 
public static const STYLE_DASHDOTDOT:String = dashdotdot

The line is made of a dash-dot-dot pattern.

STYLE_DOTConstant 
public static const STYLE_DOT:String = dot

The line is made of dots.

STYLE_NULLConstant 
public static const STYLE_NULL:String = none

The line has no symbol.

STYLE_SOLIDConstant 
public static const STYLE_SOLID:String = solid

The line is solid.

Examples
MXML usage of SimpleLineSymbol:
 <esri:SimpleLineSymbol id="sls" color="0xFF3333" width="2" alpha="0.5"/>
First ActionScript usage of SimpleLineSymbol:
 var sls:SimpleLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0xFF0000, 0.8, 2);
Second ActionScript usage of SimpleLineSymbol:
 var myOtherLineSymbol:SimpleLineSymbol = new SimpleLineSymbol();
 myOtherLineSymbol.color = 0xFFFF99;
 myOtherLineSymbol.width = 2;
 myOtherLineSymbol.alpha = 1.0;